|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-11 05:09 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
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