From:             olgo at city dot ee
Operating system: windows XP SP2
PHP version:      4.3.9
PHP Bug Type:     Class/Object related
Bug description:  Fatal error on assigning reference to class variable in 
overloaded class

Description:
------------
standard windows php 4.3.9 
apache 2 handler
globals off.

Assigning reference to class variable in overloaded class constructor/any
method.


Reproduce code:
---------------
<?php
# php 4.3.9 , apache 2.0.52
class containerClass {
  var $data;
  function containerClass(&$data) {
    $this->data =& $data;
  }
  function __set($prop_name, $prop_value) { 
    return true;
  }
}
overload("containerClass");
$contentObject = new stdclass;
$containerObject = new containerClass($contentObject);
?>

Expected result:
----------------
blank page :D
---
actually "fixed" the problem with using global directive, but it still
seems to be a bug. So enjoy.

Actual result:
--------------
Fatal error: Cannot create references to/from string offsets nor
overloaded objects in C:\Program Files\Apache
Group\Apache2\htdocs\itabi\dev\kala.php on line 8

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

Reply via email to