[wp-trac] [WordPress Trac] #16378: Use of array_intersect_key() breaks PHP4 compat

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 26 17:27:55 UTC 2011


#16378: Use of array_intersect_key() breaks PHP4 compat
------------------------------+------------------
 Reporter:  ryan              |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  3.1
Component:  Warnings/Notices  |     Version:  3.1
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |
------------------------------+------------------

Comment (by johnjamesjacoby):

 The only difference between 'array_intersect_key' and
 'array_intersect_assoc' is when an array item is not 'key => value' but is
 instead only 'value'.

 What's in core now:
 http://www.php.net/manual/en/function.array-intersect-key.php

 What's proposed:
 http://www.php.net/manual/en/function.array-intersect-assoc.php

 Another possible alternative is array_intersect:
 http://www.php.net/manual/en/function.array-intersect.php

 Array intersect seems like it could work too, since the _actions should
 match exactly if the intent is to potentially remove them.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16378#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list