Bug #55020 [Opn->Bgs]: __callStatic with __call causes crash
| From: | felipe@php.net | Date: | Thu, 09 Jun 2011 21:42:50 +0000 |
| Subject: | Bug #55020 [Opn->Bgs]: __callStatic with __call causes crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161265@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=55020&edit=1
ID: 55020
Updated by: felipe@php.net
Reported by: ebert at woltlab dot com
Summary: __callStatic with __call causes crash
-Status: Open
+Status: Bogus
Type: Bug
Package: Class/Object related
Operating System: Windows 7 x64
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
The crash is caused by call stack overflow due Foo::three() be called with object context, so
__call() is called instead of __callStatic().
You just need to make the method 'two' static, so __callStatic() will be called.
Previous Comments:
------------------------------------------------------------------------
[2011-06-09 21:03:27] ebert at woltlab dot com
Description:
------------
PHP crashes if a __call()- and __callStatic()-method exists, whereas __call() redirects calls to
__callStatic(), this is likely related to http://bugs.php.net/bug.php?id=49542
System:
Microsoft IIS 7.5
PHP 5.3.6 NTS
Test script:
---------------
Foo-Class (crashes): http://nopaste.php-quake.net/27860
Bar-Class (work-around): http://nopaste.php-quake.net/27861
Expected result:
----------------
// Foo-Class
Called static method one()
Called static method three()
// Bar-Class
Called static method one()
Called static method three()
Actual result:
--------------
// Foo-Class
PHP-Crash
// Bar-Class
Called static method one()
Called static method three()
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=55020&edit=1