[wp-trac] [WordPress Trac] #63479: current_filter() can return false if fatal

WordPress Trac noreply at wordpress.org
Sat May 24 23:52:26 UTC 2025


#63479: current_filter() can return false if fatal
--------------------------+-----------------------------
 Reporter:  kkmuffme      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:
 Severity:  trivial       |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 current_filter() (and current_action()) have a @return string
 However both can return false when used in an exception handler callback,
 if there's a fatal/uncaught exception and the current code is not run on
 an action/filter - e.g. in WP core itself or if a plugin manually loads WP
 and executes code after requiring wp-load.php

 The @return should be changed to string|false

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63479>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list