php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30222 Problem with method call
Submitted: 2004-09-24 19:33 UTC Modified: 2004-10-02 01:00 UTC
Votes:4
Avg. Score:4.2 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: max at max-net dot nl Assigned:
Status: No Feedback Package: Class/Object related
PHP Version: 4.3.8 OS: Windows 2003 Server Enterprise
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: max at max-net dot nl
New email:
PHP Version: OS:

 

 [2004-09-24 19:33 UTC] max at max-net dot nl
Description:
------------
Warning: Problem with method call - please report this bug in C:\inetpub\wwwroot\core\core\lib\template.lib.php on line 186

The actual line:
Class::function( 'set' , $this );

The way it does work (but i dont like the @):
@Class::function( 'set' , $this );

It has been reported before on the site if i am not mistaken, but maybe it is back?

Reproduce code:
---------------
Class::function( 'set' , $this );

Expected result:
----------------
Storing the new $this object with new data in a static variable in the function.

Actual result:
--------------
Warning: Problem with method call - please report this bug in C:\inetpub\wwwroot\core\core\lib\template.lib.php on line 186

But the result is correct.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-24 19:44 UTC] johannes@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.
 [2004-10-02 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, 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".
 [2006-07-14 03:47 UTC] cory dot forysth at gmail dot com
I was able to reproduce this bug on Mac OS X (and my Unix 
web host at Lunarpages, not sure what exact OS it is), using 
PHP 4.4.1.  Sample script to reproduce the error:
<?php
class A {
	function parent_test() {		
	}
}

class B extends A {
	function test() {
		$this = new B();
		parent::parent_test();
	}
}
$b = B::test();
?>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 20:01:35 2024 UTC