PHP Notice: Undefined index
-
Thanks for this useful plugin, it works great!
Just one thing: every time the script runs I’m getting this PHP Notice (repeated about 30 times):
PHP Notice: Undefined index: aps_auto_post_hook in /path/to/public/wp-content/plugins/auto-post-scheduler/auto-post-scheduler.php on line 655
The notice is referring to the 4th line in this code block:
function verify_cron_event() { $crons = get_option( 'cron' ); $events = 0; $hook = 'aps_auto_post_hook'; // This is is line 655 foreach ( $crons as $timestamp => $cron ) { if ( $cron[$hook] ) { $events++; } }
If there’s anything I can do to help debug I’m happy to help.
Thanks!
Edits: improve formatting.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP Notice: Undefined index’ is closed to new replies.