|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-11 14:30 UTC] tony2001@php.net
[2012-08-07 11:37 UTC] ab@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 23:00:01 2025 UTC |
Description: ------------ including or requiring a syntactically incorrect PHP file through stream wrapper generate uncatchable system exception - program crash. Reproduce code: --------------- class Loader { private $position; private $data; public function stream_open($path, $mode, $options, &$opened_path) { $this->data = '<' . "?php \n\"\";ll l\n ?" . '>'; $this->position = 0; return true; } function stream_read($count) { $ret = substr($this->data, $this->position, $count); $this->position += strlen($ret); return $ret; } function stream_eof() { return $this->position >= strlen($this->data); } } stream_wrapper_register('Loader', 'Loader'); require_once 'Loader://qqq.php'; Expected result: ---------------- Just the "Parse error", not the program crash. Actual result: -------------- System exception with the following description: AppName: php.exe AppVer: 5.1.6.6 ModName: php5ts.dll ModVer: 5.1.6.6 Offset: 000ad9cf