summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-07-28 09:02:41 +0000
committeralecpl <alec@alec.pl>2010-07-28 09:02:41 +0000
commitd78564abcaa254b043650e4480df6c477f783e58 (patch)
treeb9f7dba6a923800b8a2719c16df826214fb7a22c
parentc51304ddc85b5c96c954eddea77404cfc9bff249 (diff)
- Fix performance in array_keys_recursive()
-rw-r--r--program/include/rcube_shared.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index 7bb47a5f0..92785124a 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -632,8 +632,8 @@ function array_keys_recursive($array)
if (!empty($array))
foreach ($array as $key => $child) {
$keys[] = $key;
- if ($children = array_keys_recursive($child))
- $keys = array_merge($keys, $children);
+ foreach (array_keys_recursive($child) as $val)
+ $keys[] = $val;
}
return $keys;
}