From: Geoffrey T. D. <da...@us...> - 2001-09-20 18:26:16
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv25209/lib Modified Files: FileFinder.php Log Message: Workaround for apparent bug in some versions of PHP (notably the PHP 4.0.6 which is on SourceForge's project web server.) Index: FileFinder.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/FileFinder.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** FileFinder.php 2001/09/19 19:16:27 1.1 --- FileFinder.php 2001/09/20 18:26:14 1.2 *************** *** 126,131 **** if (!in_array($dir, $path)) { $path[] = $dir; ! ini_set('include_path', implode(':', $path)); } } } --- 126,143 ---- if (!in_array($dir, $path)) { $path[] = $dir; ! //ini_set('include_path', implode(':', $path)); } + /* + * Some (buggy) PHP's (notable SourceForge's PHP 4.0.6) + * sometimes don't seem to heed their include_path. + * I.e. sometimes a file is not found even though it seems + * to be in the current include_path. + * A simple ini_set('include_path', ini_get('include_path')) + * seems to be enough to fix the problem + * + * This following line should be in the above if-block, + * but we put it here, as it seems to work-around the bug. + */ + ini_set('include_path', implode(':', $path)); } } |