php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56976 Apache crashes when "__call" method added.
Submitted: 2006-04-25 03:40 UTC Modified: 2013-02-26 22:21 UTC
From: anter at voliacable dot com Assigned: pollita (profile)
Status: Closed Package: runkit (PECL)
PHP Version: 5.1.2 OS: Win2k
Private report: No CVE-ID: None
 [2006-04-25 03:40 UTC] anter at voliacable dot com
Description:
------------
If in a base class "Simple" to add a method "__call", at its call in an inherited class "Simple2" the Apache crashes.

Reproduce code:
---------------
class Simple
{
    public function foo()
    {
        return "foo!";
    }
}

class Simple2 extends Simple
{
    public function foo()
    {
        return "foo2";
    }
}

$__call = 'return call_user_func_array(array($this, "prefix_".$method), $args);';

runkit_method_add('Simple', '__call', '$method, $args = array()', $__call, RUNKIT_ACC_PUBLIC);

runkit_method_rename('Simple2', 'foo', 'prefix_foo');

$simple = new Simple2();

$simple->foo();


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-26 22:21 UTC] pollita@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2013-02-26 22:21 UTC] pollita@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pollita
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC