|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-07-03 06:13 UTC] karl at karlaustin dot com
Description: ------------ Fatal error: Only variables or references can be returned by reference in /usr/local/php5/lib/php/DB/common.php on line 737 If seems that doing: return new DB_result($this, $result); in a function results in the above error, but: $_tmp = new DB_result($this, $result); return $_tmp; Is fine. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 23:00:01 2025 UTC |
I have the same error, it seems like it comes from a function that must return a reference, but objects are already references. this doesn't work, but worked before beta1, I tried PEAR before beta1 and it uses lots of this : function &myFunc() { return new MyClass(); } This works fine : function myFunc() { return new MyClass(); } I don't understand why it comes from return (new Class()); cause it doesn't work.