Adding fix for #2933, function arrayTrim in class INI_ACL fail to work

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5455 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-07-24 13:55:25 +00:00
parent 7b4264b68c
commit 9ee71eefa7

View file

@ -585,16 +585,11 @@ class INI_ACL extends AclBase {
* @return array
*/
function arrayTrim($array) {
foreach ($array as $element) {
$element = trim($element);
foreach ($array as $key => $value) {
$array[$key] = trim($value);
}
//Adding this element keeps array_search from returning 0:
//0 is the first key, which may be correct, but 0 is interpreted as false.
//Adding this element makes all the keys be positive integers.
array_unshift($array, "");
return $array;
}
}
?>