Support » Plugin: Auto Post Scheduler » PHP Notice: Undefined index

  • Resolved MattV

    (@mattv)


    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.

    • This topic was modified 1 year, 4 months ago by  MattV.
    • This topic was modified 1 year, 4 months ago by  MattV.
    • This topic was modified 1 year, 4 months ago by  MattV.
    • This topic was modified 1 year, 4 months ago by  MattV.
Viewing 1 replies (of 1 total)
  • Please ignore this message, my mistake. Unfortunately I can’t delete it anymore, but I’ll just mark it as resolved. Thanks again for the plugin!

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Notice: Undefined index’ is closed to new replies.