From: tokul Date: Wed, 10 Aug 2005 18:35:41 +0000 (+0000) Subject: removing references from backend functions. lookup causes E_NOTICE in php X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=aa8c4265a1793db0f37976e9145f89bb9b6d9a89;p=squirrelmail.git removing references from backend functions. lookup causes E_NOTICE in php 4.4.0, because tries to return array(). Use of references can't be explained. Main backend class and file/ldap backends don't use refencences. If it is used for some reason, other lookup() should have to use references too. I suspect that reason is performance or it is relict from some different code. PHP manual says that developers should not use references in order to increase performance. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9925 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/abook_database.php b/functions/abook_database.php index 7a386e7c..765ab984 100644 --- a/functions/abook_database.php +++ b/functions/abook_database.php @@ -179,7 +179,7 @@ class abook_database extends addressbook_backend { * @param string $expr search expression * @return array search results */ - function &search($expr) { + function search($expr) { $ret = array(); if(!$this->open()) { return false; @@ -228,7 +228,7 @@ class abook_database extends addressbook_backend { * @param string $alias alias * @return array search results */ - function &lookup($alias) { + function lookup($alias) { if (empty($alias)) { return array(); } @@ -266,7 +266,7 @@ class abook_database extends addressbook_backend { * List all addresses * @return array search results */ - function &list_addr() { + function list_addr() { $ret = array(); if (!$this->open()) { return false;