Changes between Initial Version and Version 1 of Ticket #16562, comment 3
- Timestamp:
- 02/16/2011 12:30:53 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16562, comment 3
initial v1 1 1 Nice find. 2 2 3 For a little explanation what is going on, basically it's using a key value as a numerical offset: 4 3 5 * array_search() returns the key, not the offset of an array. 4 * using a numerical offset which must not be the numerical value of $key.5 * used to remove a single element only, it just does what unset() is used for.6 * array_splice() is using a numerical offset which must not be the numerical value of $key. 7 * array_splice() is used to remove a single element only, it just does what unset() is used for. 6 8 7 9 Trivial to patch.