[Tickets #2954] NEW: Warnings with PHP 5.1: Only variables can be passed by reference

bugs@bugs.horde.org bugs at bugs.horde.org
Thu Nov 10 23:58:51 PST 2005


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

Ticket URL: http://bugs.horde.org/ticket/?id=2954
-----------------------------------------------------------------------
 Ticket             | 2954
 Created By         | fse at camline.com
 Summary            | Warnings with PHP 5.1: Only variables can be passed by reference
 Queue              | Horde Framework Packages
 Version            | HEAD
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


fse at camline.com (2005-11-10 23:58) wrote:

The way how factory methods are implemented in many Horde classes seems to
confuse PHP 5.1:

    function &factory($driver, $params = null)
    {
...
      >>>      return $ret = &new $class($params);
...
    }

The warning is thrown once the factory method returns the new class.

If debug_level includes reporting of warnings, the application is blocked,
because http headers cannot be set anymore...

Workaround:
set in $HORDE_HOME/config.conf.php:
$conf['debug_level'] = E_ERROR;





More information about the bugs mailing list