For Programmers: Free Programming Magazines  


Home > Archive > PHP Questions and Answers > January 2006 > Bug #32660









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Bug #32660
Clint Priest

2006-01-14, 6:55 pm

Hey all,

I more or less consider this to be a quality assurance type of thing. I'm
running into a problem with something I'd like to do with the engine and
getting the error:

Fatal error: Cannot assign by reference to overloaded object in xyz.php

After looking into what the error is I came across this Bug#32660 which seems
to be the change that was put in place which causes this error.

If you look at the bug request you can see that it causes crashes and rather
than fix the crash they simple prevented the functionality from being allowed.

The functionality is quite useful, I've attached a sample piece of code which
I'm trying to use. Is there any way someone can look into this and determine
if indeed the fix put in place is appropriate? I don't believe it is so...

Thanks!

-Clint Priest

http://bugs.php.net/bug.php?id=32660

Sample Code:

class a {
public $testObj;

function __construct() {
$this->testObj = new b();
$this->test_var = &$this->testObj->test_var;
}
}

class b {
public $test_var;
}

$Object = new a();

When this is constructed, it will give the fatal error on the assign by
reference line which I feel should be allowed code.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com