php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33839 Warning: Problem with method call - please report this bug (works with PHP 5.1)
Submitted: 2005-07-23 21:23 UTC Modified: 2006-01-01 01:00 UTC
Votes:11
Avg. Score:3.6 ± 1.2
Reproduced:9 of 10 (90.0%)
Same Version:3 (33.3%)
Same OS:3 (33.3%)
From: kamil at markowicz dot info Assigned: derick (profile)
Status: No Feedback Package: Class/Object related
PHP Version: 4CVS-2005-07-23 OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kamil at markowicz dot info
New email:
PHP Version: OS:

 

 [2005-07-23 21:23 UTC] kamil at markowicz dot info
Description:
------------
I have a class called INIT that stores object of classes in array. When I add a line $this->db = &$db; PHP reports an error. 

This happens ONLY when I add this line. Then suddenly everywhere, where I called INIT class, PHP gives me this error.

Reproduce code:
---------------
$db = Instance::get('MySQLConnector');

$db->connectDB($config[db][host], $config[db][user], $config[db][password],  $config[db][database]);
		
$this->db = &$db; // THIS IS THIS LINE

// creating object of this class

$core = Instance::get('Core');

// Intializing Router Class

$router = Instance::get('Router');

$_param = $router->parseURL();


Expected result:
----------------
It is suppose to assign DB object to class' varable $db ($this->db = &$db).

Actual result:
--------------
Warning: Problem with method call - please report this bug in C:\usr\www\ff\class\Core.class.php on line 39

Warning: Problem with method call - please report this bug in C:\usr\www\ff\class\Core.class.php on line 43

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-24 01:31 UTC] kamil at markowicz dot info
Here is the url to this example:
http://dev.kafelamps.com/bug_example.php

I marked the line that causes all the problems :). I hope you will figure out how this could be fixed.
 [2005-08-01 00:45 UTC] sniper@php.net
Yet another bug caused by the reference "fix"..
 [2005-08-01 00:46 UTC] sniper@php.net
PHP 5 give a proper error with this..

 [2006-01-01 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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC