#33839 [Asn->Fbk]: Warning: Problem with method call - please report this bug (works with PHP 5.1)
ID: 33839
Updated by: sniper@php.net
Reported By: kamil at markowicz dot info
-Status: Assigned
+Status: Feedback
Bug Type: Class/Object related
Operating System: *
PHP Version: 4CVS-2005-07-23
Assigned To: derick
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-08-01 00:46:45] sniper@php.net
PHP 5 give a proper error with this..
------------------------------------------------------------------------
[2005-08-01 00:45:00] sniper@php.net
Yet another bug caused by the reference "fix"..
------------------------------------------------------------------------
[2005-07-24 01:31:02] 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-07-23 21:23:44] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33839&edit=1
Thread (7 messages)