|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7756 Problems w/include ""
Submitted: 2000-11-11 00:47 UTC Modified: 2000-11-11 05:09 UTC
From: bens at benjamindsmith dot com Assigned:
Status: Closed Package: *Function Specific
PHP Version: 4.0.3pl1 OS: RH 6.2
Private report: No CVE-ID: None
 [2000-11-11 00:47 UTC] bens at benjamindsmith dot com
Executing the following code 


if (false===include ($a))
	echo "Couldn't include file"; 
	// error handling
	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 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. 




Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-11 05:09 UTC]
fixed in CVS
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu May 23 15:01:32 2019 UTC