File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323define ('REPORT_LEVEL ' , 2 ); // 0 reports less false-positives. up to level 5.
2424define ('VERSION ' , '5.2 ' ); // minimum is 5.2
25- define ('PHPDIR ' , dirname (__FILE__ ) . '/../.. ' );
25+ define ('PHPDIR ' , realpath ( dirname (__FILE__ ) . '/../.. ' ) );
2626
2727
2828// be sure you have enough memory and stack for PHP. pcre will push the limits!
@@ -64,7 +64,12 @@ function error($str, $level = 0)
6464 global $ current_file , $ current_function , $ line ;
6565
6666 if ($ level <= REPORT_LEVEL ) {
67- echo substr ($ current_file , strlen (PHPDIR )+1 ) . " [ $ line] $ current_function : $ str \n" ;
67+ if (strpos ($ current_file ,PHPDIR ) === 0 ) {
68+ $ filename = substr ($ current_file , strlen (PHPDIR )+1 );
69+ } else {
70+ $ filename = $ current_file ;
71+ }
72+ echo $ filename , " [ $ line] $ current_function : $ str \n" ;
6873 }
6974}
7075
@@ -364,5 +369,5 @@ function recurse($path)
364369}
365370
366371foreach ($ dirs as $ dir ) {
367- recurse ($ dir );
372+ recurse (realpath ( $ dir) );
368373}
You can’t perform that action at this time.
0 commit comments