php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19399 Problem with method call - please report this bug
Submitted: 2002-09-14 00:20 UTC Modified: 2002-12-24 01:00 UTC
Votes:7
Avg. Score:4.6 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:2 (28.6%)
Same OS:1 (14.3%)
From: fclever at verinform dot com Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 4.2.3 OS: Linux & Win2000
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-09-14 00:20 UTC] fclever at verinform dot com
I get the following error message:

Warning: Problem with method call - please report this bug in line xyz.
This error message comes from /Zend/zend_execute.c, line 1638.

This error occurs in our applications framework with many intermingled classes on both Linux and Windows 2000 Boxes (I have not checked on Solaris yet). I have not been able to produce a simple set of classes producing this error. The basic structure of what our code is doing is:

class CUi {
function httpHeader($p_disableGzHandler = false) {
}
function htmlHead($p_subDirs = false) {
	if ( ! isset($this) ) {
		// this is the static pseudo initialization
		$this->m_subDirs = $p_subDirs;
	}
	CUi::httpHeader(); // this is the line where the error occurs
}
}
CUi::httpHeader();

If I move the CUi:httpHeader() call done from within htmlHead() above "if (! isset($this) )" the error does not occur.

I am sorry to not be able to provide better information. I would not have reported this bug, but it explicitly asks to report it, so here we go.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-06 00:29 UTC] anarcat at anarcat dot ath dot cx
I have had a similar situation when assigning to $this:

function seek_and_destroy($where_ary) {
  if (!isset($this)) {
    $this = new ecdGroupedNews(); // this is the line where the warning is pointing to
  }
 ...
}

this yields:

Warning: Problem with method call - please report this bug in /usr/home/anarcat/data/web_pages/www/anarcat.ath.cx/php/ecdGroupedNews.inc.php on line 44

well, it's not *exactly* the same thing, but there is a similarity: both problems occur when referencing $this in shadowy conditions (ie. unset($this)).
 [2002-12-06 00:31 UTC] The Anarcat <anarcat at anarcat dot ath dot cx>
Also note that morphing the code into:

        function seek_and_destroy($where_ary) {
          if (!isset($this)) {
            $foo = new ecdGroupedNews();
          } else {
            $foo = $this;
          }

supressees the warning, of course, so it is a proper workaround, for me.
 [2002-12-08 10:47 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


I can not reproduce this with PHP 4.3.0-dev..

 [2002-12-24 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2003-08-16 09:36 UTC] rct_sixflags2 at hotmail dot com
i get it  al so on windows me 

this is the furst php bug that badders me :(
 [2005-05-29 11:41 UTC] oracle dot shinoda at gmail dot com
I have experienced this error on php 4.3.11 installed via Debian APT. I was calling DB::isError from PEAR inside another static method (Release::create), that I had written myself.

Perhaps calling a static method from within another static method is causing this problem? I haven't got time to build a test suite though...
 [2005-05-29 11:49 UTC] oracle dot shinoda at gmail dot com
If I change the DB::isError calls to $this->_db->isError, the script runs correctly, which is why I suggested the double-static method call being a problem.

Thank goodness for PHP4's lazy OO implementation, else I'd be stuck with a massive refactoring job now!
 [2005-05-30 02:03 UTC] oracle dot shinoda at gmail dot com
Actually, I have found one reason why it may not work: I was referring to a member variable ($this->_db) inside my static call!!

This should throw a fatal error, not a bug report warning, though I see that you won't be fixing it since PHP5 is out and you won't fix bugs in PHP4's OO support unless they occur in PHP5.

I don't have access to PHP5 so I can't tell if it is a problem there or not.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC