ID:               33839
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kamil at markowicz dot info
 Status:           Assigned
 Bug Type:         Class/Object related
 Operating System: *
 PHP Version:      4CVS-2005-07-23
 Assigned To:      derick
 New Comment:

PHP 5 give a proper error with this..



Previous Comments:
------------------------------------------------------------------------

[2005-08-01 00:45:00] [EMAIL PROTECTED]

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

Reply via email to