ID: 35725 User updated by: simon dot jackson at caringbush dot net Reported By: simon dot jackson at caringbush dot net Status: Bogus Bug Type: Scripting Engine problem Operating System: RedHat ES 4 PHP Version: 5.1.1 New Comment:
I am trying to find in the manual how this syntax in incorrect. I have read the assignment section, and can't yet see how this is incorrect. This will help me (an perhaps the horde people) no make this mistake in the future. Previous Comments: ------------------------------------------------------------------------ [2005-12-18 11:12:29] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This is indeed a bug in Horde. ------------------------------------------------------------------------ [2005-12-18 11:02:05] judas dot iscariote at gmail dot com It's a Horde error, not a PHP bug. ------------------------------------------------------------------------ [2005-12-18 10:54:30] simon dot jackson at caringbush dot net Description: ------------ With Horde 3.0.9 (in many places) on PHP 5.0.4, the following works: if (class_exists($class)) { return $ret = &new $class($params); } It fails on PHP 5.1.0 and PHP 5.1.1 with an error of Notice: Only variable references should be returned by reference in ...on line ... However, the following does work: if (class_exists($class)) { $ret = &new $class($params); return $ret; } Is this an error in PHP or Horde? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35725&edit=1
