diff options
author | Christian Schneider | 2022-10-03 13:01:30 +0200 |
---|---|---|
committer | Christian Schneider | 2022-10-03 13:01:30 +0200 |
commit | 53db056c0fa24c1c8539a36002a3009f6a15bfa1 (patch) | |
tree | 989c2f084859b0bc48055769580c838c36e0fb35 /it.class | |
parent | 6d488d7acdacfa8ac477da0afe5175ef9d98dfbe (diff) | |
download | itools-53db056c0fa24c1c8539a36002a3009f6a15bfa1.tar.gz itools-53db056c0fa24c1c8539a36002a3009f6a15bfa1.tar.bz2 itools-53db056c0fa24c1c8539a36002a3009f6a15bfa1.zip |
Revert "Fix it::map with generators: Avoid iterating over generator twice"
This reverts commit 6d488d7acdacfa8ac477da0afe5175ef9d98dfbe.
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($result, $p['keys']) : $result as $k => $v) + foreach (isset($p['keys']) ? it::filter_keys($array, $p['keys']) : $array as $k => $v) $result[$k] = $func($k, $v); return (array)$result; |