PHP 4.0 Bug #7756 Updated: Problems w/include ""

From: Date: Sat, 11 Nov 2000 10:09:19 +0000
Subject: PHP 4.0 Bug #7756 Updated: Problems w/include ""
Groups: php.dev 
Request: Send a blank email to php-dev+get-37728@lists.php.net to get a copy of this message
ID: 7756 Updated by: hholzgra Reported By: bens@benjamindsmith.com Status: Closed Bug Type: *Function Specific Assigned To: Comments: fixed in CVS Previous Comments: --------------------------------------------------------------------------- [2000-11-11 00:47:57] bens@benjamindsmith.com Executing the following code <? $a=""; if (false===include ($a)) { echo "Couldn't include file"; // error handling } else { echo "file found!"; // all is well... } ?> causes the script to crash instead of allowing me to trap the error. This could be fixed with a simple input sanity check in the include function! I see that you've already seen this bug in a different form http://bugs.php.net/bugs.php?id=6743 but this didn't address the problem given here. Include is a function like any other, and if it fails, the script shouldn't cause all action to stop. It, like any other function, should return false and should be trapable in the code above. Thanks! -Ben --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7756

« previous php.dev (#37728) next »