Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16897 closed defect (bug) (invalid)

wp_schedule_event with array of $args does not pass array to action

Reported by: commentluv's profile commentluv Owned by:
Milestone: Priority: normal
Severity: major Version: 3.1
Component: Cron API Keywords:
Focuses: Cc:


when I schedule an event with an array of $args , when the action is called by the cron, it does not pass the callback function the array, it sends a single string value.

action is registered with this


function fhprw_check_fetch($args){
//do stuff according to $type

when I use


the option 'debug_args' is a serialised array as would be expected

but if an event is scheduled with


then when the event happens after 1 minute, the callback function receives $args as a string 'uk'

the option 'debug_args' is a single string of

Change History (2)

#1 @commentluv
13 years ago

  • Resolution set to invalid
  • Status changed from new to closed

ok figured this out about a pico second after wpmuguru answered me on twitter

scheduled cron callback functions receive arg1,arg2,arg3 , not as an array

#2 @ocean90
13 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.