1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Files
archived-php-src/ext/standard
Tyson Andre fe2dc2b481 Avoid crash for reset/end/next/prev() on ffi classes (#9711)
(And any PECLs returning `zend_empty_array` in the handler->get_properties
overrides)

Closes GH-9697

This is similar to the fix used in d9651a9419
for array_walk.

This should make it safer for php-src (and PECLs, long-term) to return
the empty immutable array in `handler->get_properties` to avoid wasting memory.
See https://github.com/php/php-src/issues/9697#issuecomment-1273613175

The only possible internal iterator position for the empty array is at the end
of the empty array (nInternalPointer=0).
The `zend_hash*del*` helpers will always set nInternalPointer to 0 when an
array becomes empty,
regardless of previous insertions/deletions/updates to the array.
2023-02-03 09:17:33 -05:00
..
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-07 12:11:52 +02:00
2022-07-15 12:48:09 +01:00
2020-10-26 11:06:10 +01:00
2020-06-17 13:04:01 +00:00
2020-04-14 15:16:26 +00:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-08-19 10:39:23 +02:00
2021-08-19 10:39:23 +02:00
2021-08-19 10:39:23 +02:00
2021-05-06 12:16:35 +02:00
2020-05-14 13:35:12 +02:00
2021-08-30 18:55:16 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2022-03-04 16:07:54 +01:00
2021-07-06 12:03:55 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-07-16 10:07:35 +02:00
2021-05-06 12:16:35 +02:00
2021-06-29 11:30:26 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2022-01-17 22:32:37 +01:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-06-11 09:34:03 +02:00
2021-05-06 12:16:35 +02:00
2021-07-20 15:14:08 +02:00
2021-11-15 10:00:55 +01:00
2021-05-06 12:16:35 +02:00
2022-07-15 12:48:09 +01:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2022-06-19 20:09:37 +01:00
2021-05-06 12:16:35 +02:00
2021-05-06 12:16:35 +02:00
2021-08-01 18:03:30 +01:00
2021-05-06 12:16:35 +02:00