#35725 [Com]: Error with the return of an assignment

From: Date: Sun, 18 Dec 2005 10:02:05 +0000
Subject: #35725 [Com]: Error with the return of an assignment
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-90609@lists.php.net to get a copy of this message
ID: 35725 Comment by: judas dot iscariote at gmail dot com Reported By: simon dot jackson at caringbush dot net Status: Open Bug Type: Scripting Engine problem Operating System: RedHat ES 4 PHP Version: 5.1.1 New Comment: It's a Horde error, not a PHP bug. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#90609) next »