[dw-free] Warning in the logs when there are no included files in JS tests
[commit: http://hg.dwscoalition.org/dw-free/rev/f4d51a6cd107]
http://bugs.dwscoalition.org/show_bug.cgi?id=3541
Fix warnings.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3541
Fix warnings.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/DW/Controller/Dev.pm
-------------------------------------------------------------------------------- diff -r c8a1ed6b6719 -r f4d51a6cd107 cgi-bin/DW/Controller/Dev.pm --- a/cgi-bin/DW/Controller/Dev.pm Thu Feb 24 21:50:20 2011 +0800 +++ b/cgi-bin/DW/Controller/Dev.pm Thu Feb 24 21:56:24 2011 +0800 @@ -58,7 +58,7 @@ sub tests_handler { my $testcontent = eval{ DW::Template->template_string( "dev/tests/${test}.js" ) } || ""; if ( $testcontent ) { $testcontent =~ m#/\*\s*INCLUDE:\s*(.*?)\*/#s; - my $match = $1; + my $match = $1 || ""; for my $res ( split( /\n+/, $match ) ) { # skip things that don't look like names (could just be an empty line) --------------------------------------------------------------------------------