[wp-trac] [WordPress Trac] #33245: 4.3 - Invalid arguments passed to wp_validate_redirect within wp_safe_redirect()

WordPress Trac noreply at wordpress.org
Mon Aug 3 18:26:30 UTC 2015


#33245: 4.3 - Invalid arguments passed to wp_validate_redirect within
wp_safe_redirect()
----------------------------+------------------------------
 Reporter:  paultgoodchild  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  General         |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by obenland):

 Hi Paul, thanks for bring this up!

 Hook callbacks, no matter whether they are action or filter callbacks,
 will get all arguments passed on to them that are defined after the name
 of the hook (in this case `wp_safe_redirect_fallback`). So the only
 arguments it gets is `admin_url()` and `$status`.

 From the function documentation of `apply_filters()`:

 {{{

  * @param string $tag   The name of the filter hook.
  * @param mixed  $value The value on which the filters hooked to `$tag`
 are applied on.
  * @param mixed  $var   Additional variables passed to the functions
 hooked to `$tag`.
  * @return mixed The filtered value after all hooked functions are applied
 to it.
 }}}

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


More information about the wp-trac mailing list