Home » Database » DB_DataObject » Bug #5893
DataObject.php:2716 Only variable references should be returned by reference
Details
| Submitted | 2005-11-08 11:34 UTC |
|---|---|
| From | nikolas dot hagelstein at googlemail dot com |
| Assigned | alan_k |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | 4.4.1 |
| OS | Linux 2.4.30 |
| Roadmaps | (Not assigned) |
Comments
[2005-11-08 11:34 UTC] nikolas dot hagelstein at googlemail dot com
Description:
------------
Version 1.361
DataObject.php:2716] Only variable references should be returned by reference
occurses on calling getlink()
2677 -> &getLink()
2716 -> return false;
Related the the changes in PHP 4.4.0
Test script:
---------------
error_reporting(E_ALL);
function & test_false_fail() {
return false;
}
test_false();
-----
Workaround would be something like:
$ret=false;
return $ret;
Expected result:
----------------
Should reproduce the error.
[2005-11-08 11:49 UTC] nikolas dot hagelstein at googlemail dot com
This happens everytime a constant like false/true/null is returned by reference. I do not know how to return this properly. Using a temporary varialble seems a little ugly to me.