Segmentation fault on static call with empty string method
| Bug #46238 | Segmentation fault on static call with empty string method | ||||
|---|---|---|---|---|---|
| Submitted: | 2008-10-05 22:20 UTC | Modified: | 2008-10-06 00:41 UTC | ||
| From: | seppo0010 at yahoo dot com dot ar | Assigned: | felipe (profile) | ||
| Status: | Closed | Package: | Unknown/Other Function | ||
| PHP Version: | 5.3.0alpha2 | OS: | Ubuntu 8.04 | ||
| Private report: | No | CVE-ID: | None | ||
[2008-10-05 22:20 UTC] seppo0010 at yahoo dot com dot ar
Description:
------------
The magic __callStatic method throws a segmentation fault when the method name is an empty string.
Reproduce code:
---------------
class a {
static function __callStatic($name, $arguments)
{
var_dump(array($name, $arguments));
}
}
$a = 'a';
$b = '';
$a::$b($a);
Expected result:
----------------
array(2) {
[0]=>
string(0) ""
[1]=>
array(1) {
[0]=>
string(1) "a"
}
}
- OR -
Fatal error: Function name must be a not empty string in __FILE__ on line 10
Actual result:
--------------
Internal server error when running on apache.
Segmentation fault running as CLI.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2008-10-06 00:41 UTC] felipe@php.net