[Tickets #3167] NEW: Return of reerence variables

bugs@bugs.horde.org bugs at bugs.horde.org
Sun Dec 18 14:05:15 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3167
-----------------------------------------------------------------------
 Ticket             | 3167
 Created By         | simon.jackson at carringbush.net
 Summary            | Return of reerence variables
 Queue              | Horde Framework Packages
 Version            | FRAMEWORK_3
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


simon.jackson at carringbush.net (2005-12-18 14:05) wrote:

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;
  }

I originally submitted this wih PHP, but they point out that it is a bug in
Horde.




More information about the bugs mailing list