cvs: pear /LiveUser LiveUser.php

From: Date: Wed, 17 Aug 2005 12:05:22 +0000
Subject: cvs: pear /LiveUser LiveUser.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-34063@lists.php.net to get a copy of this message
lsmith Wed Aug 17 08:05:22 2005 EDT Modified files: /pear/LiveUser LiveUser.php Log: - do not modify the config array in storageFactory() since its passed by ref http://cvs.php.net/diff.php/pear/LiveUser/LiveUser.php?r1=1.100&r2=1.101&ty=u Index: pear/LiveUser/LiveUser.php diff -u pear/LiveUser/LiveUser.php:1.100 pear/LiveUser/LiveUser.php:1.101 --- pear/LiveUser/LiveUser.php:1.100 Tue Aug 16 09:59:06 2005 +++ pear/LiveUser/LiveUser.php Wed Aug 17 08:05:22 2005 @@ -40,7 +40,7 @@ * @author Bjoern Kraus <krausbn@php.net> * @copyright 2002-2005 Markus Wolff * @license http://www.gnu.org/licenses/lgpl.txt - * @version CVS: $Id: LiveUser.php,v 1.100 2005/08/16 13:59:06 lsmith Exp $ + * @version CVS: $Id: LiveUser.php,v 1.101 2005/08/17 12:05:22 lsmith Exp $ * @link http://pear.php.net/LiveUser */ @@ -626,8 +626,14 @@ return $storage; // if the storage container does not exist try the next one in the stack } elseif ($count > 1) { - array_pop($confArray); - $storage =& LiveUser::storageFactory($confArray, $classprefix); + // since we are using pass by ref we cannot pop from the original array + $keys = array_keys($confArray); + array_pop($keys); + $newConfArray = array(); + foreach ($keys as $key) { + $newConfArray[$key] =& $confArray[$key]; + } + $storage =& LiveUser::storageFactory($newConfArray, $classprefix); return $storage; } }

« previous php.pear.cvs (#34063) next »