diff options
author | Christian Schneider | 2022-10-03 16:02:35 +0200 |
---|---|---|
committer | Christian Schneider | 2022-10-03 16:02:35 +0200 |
commit | 53e71626424285dbed893ee615c98fa378c30b19 (patch) | |
tree | 331d8df8ba6badbdb3af10876d3c7b779034469d /it.class | |
parent | 6d649237a4dae8cc6a1537902c1cfd8a3870243d (diff) | |
download | itools-53e71626424285dbed893ee615c98fa378c30b19.tar.gz itools-53e71626424285dbed893ee615c98fa378c30b19.tar.bz2 itools-53e71626424285dbed893ee615c98fa378c30b19.zip |
Fix it::map with generators which can only be used once
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1111,7 +1111,7 @@ static function map($code, $array, $p = null) { $func = self::createfunc($code); $result = is_array($array) ? $array : iterator_to_array($array); - foreach (isset($p['keys']) ? it::filter_keys($array, $p['keys']) : $array as $k => $v) + foreach (isset($p['keys']) ? it::filter_keys($result, $p['keys']) : $result as $k => $v) $result[$k] = $func($k, $v); return (array)$result; |