require()/include() still crash when arg1 is file pointer
| From: | Faisal Nasim | Date: | Thu, 18 May 2000 08:03:17 +0000 |
| Subject: | require()/include() still crash when arg1 is file pointer | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18900@lists.php.net to get a copy of this message | ||
Hi,
<?
$fp = fopen ( "blah" , "r" ); # 'blah' doesn't exist!
include ( $fp ); // require ( $fp ); crashes as well!
fclose ( $fp );
exit;
?>
I am not willing to use something like this but it
should not crash! I posted a bug report a LONG time
ago, and I think it was Andi who replied back saying
that this is not allowed but it shouldn't crash either...
Should be fixed before 4.0-rel.
Ah, got it:
ID: 3762
Updated by: andi
Reported By: faisal@nasim.org
Status: Open
Bug Type: Reproduceable crash
Assigned To:
Comments:
This isn't supposed to work because you are supposed to give include() a
filename and not a file handle. In any case, I'm keeping the bug report open
because PHP shouldn't crash in such a case.
Full Bug description available at: http://bugs.php.net/version4/?id=3762
Faisal