WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #16562, comment 3


Ignore:
Timestamp:
02/16/11 12:30:53 (3 years ago)
Author:
hakre
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16562, comment 3

    initial v1  
    11Nice find.  
    22 
     3For a little explanation what is going on, basically it's using a key value as a numerical offset: 
     4 
    35* 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. 
    68 
    79Trivial to patch.