[wp-trac] [WordPress Trac] #40192: apply_filters() works only once, if doing multiple array merge

WordPress Trac noreply at wordpress.org
Sat Mar 18 10:33:21 UTC 2017


#40192: apply_filters() works only once, if doing multiple array merge
--------------------------+----------------------
 Reporter:  esemlabel     |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------

Comment (by esemlabel):

 Understood. But why the core files uses array_merge() in apply_filters()
 in

 https://core.trac.wordpress.org/browser/trunk/src/wp-
 admin/maint/repair.php#L88
 https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/cron.php#L409

 There is no any note that we can't use these filter more than once,
 because of array_merge() in it doesnt handle more than one return of
 value.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40192#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list