From:             kamil at markowicz dot info
Operating system: Windows XP SP1
PHP version:      4CVS-2005-07-23 (stable)
PHP Bug Type:     Class/Object related
Bug description:  Bug releated to objects

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 bug report at http://bugs.php.net/?id=33839&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33839&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33839&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33839&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33839&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33839&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33839&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33839&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33839&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33839&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33839&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33839&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33839&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33839&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33839&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33839&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33839&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33839&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33839&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33839&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33839&r=mysqlcfg

Reply via email to