mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
7b4264b68c
commit
9ee71eefa7
1 changed files with 2 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Reference in a new issue