#42455 [Fbk->Opn]: "Call to undefined method" - but method isn't undefined!
| From: | klikics at preisroboter dot de | Date: | Tue, 28 Aug 2007 12:24:49 +0000 |
| Subject: | #42455 [Fbk->Opn]: "Call to undefined method" - but method isn't undefined! | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-116766@lists.php.net to get a copy of this message | ||
ID: 42455
User updated by: klikics at preisroboter dot de
Reported By: klikics at preisroboter dot de
-Status: Feedback
+Status: Open
Bug Type: Class/Object related
Operating System: Linux
PHP Version: 5.2.3
New Comment:
Ok, another try ;-)
I've got a class "search" and another class "cluster_search" (in the
same file). In "cluster" there is a method "get_threader()", but not in
"search".
In the constructor of "search" is an object $clustersearch created from
"cluster_search" and the constructor of "cluster_search" calls the
method $this->get_threader() from class "cluster_search".
Sometimes, PHP try's to call search::get_threader() instead of
$this->get_threader at this moment ($this is here the class
"cluster_search") and throws this error:
Fatal error: Call to undefined method search::get_threader() in
/www/class_.php on line 1305
The problem is, that I can't reproduce this error.
I hope it's not to much confusion ... ;)
Previous Comments:
------------------------------------------------------------------------
[2007-08-28 11:15:49] jani@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2007-08-28 09:44:56] klikics at preisroboter dot de
Description:
------------
Sometimes PHP throw's the following error:
Fatal error: Call to undefined method suche::get_threader() in
/www/class_.php on line 1305
instead of just processing the function $this->get_threader() ...
This comes up only every 10000 requests or something, so I can't
reproduce it.
I'm wondering about the "::", because the call in the script is
$this->get_threader(). That's why I think it's an internal bug of PHP.
The .php with the class is included via require() to the page where the
error appears.
Hope this helps or you can help. Thanks in advance.
Reproduce code:
---------------
// line 1305
$fp = $this->get_threader();
Expected result:
----------------
$fp is a filepointer from fsockopen() .. the script should progress.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42455&edit=1