Skip to content

php 4.4.0 and horde

by nick on October 22nd, 2005

If you happen to come here looking for information on this error dealing with php 4.4.0 and horde:

“Notice: Only variable references should be returned by reference in /usr/share/horde2/lib/Auth.php on line 80″

There are 3 files you’ll need to fix.

You should see this in lib/Auth.php:

return new Auth;

which needs to be changed to:

$auth = new Auth;
return $auth;

In lib/Prefs.php:

return new Prefs;

to:

$prefs = new Prefs;
return $prefs;

Also change the following:

return new $class($user, $password, $scope, $params, $caching);

To:

$tempClass = new $class($user, $password, $scope, $params, $caching);
return $tempClass;

In kronolith/lib/Driver.php:

return new $class($params);

To:

$tempClass = new $class($params);
return $tempClass;

Basically the return value has to be an explicitly defined variable, not an value. Anyplace you see

return new …;

it needs to be replaced with

$newVar = new …;
return $newVar;
.

Hopefully that helps someone get around the error.

Related Posts

  • No Related Post

From → General

Comments are closed.