better function check
-
In class-pushpress.php there is a function publish_post
this function calls $this->get_subscribers
given that $this->get_subscribers can return false surely is is better to then wrap the foreach loops like this to prevent errors:
if (!empty($subs)){
foreach ( (array) $subs as $callback => $data ) {
if ( $data[‘is_active’] == FALSE )
continue;$this->schedule_ping( $callback, $post_id, ‘atom’, $data[‘secret’] );
}
}
- The topic ‘better function check’ is closed to new replies.