Merge pull request #22160 from bordoni/lib-action-scheduler-php-52
Lib Action Scheduler PHP 5.2 Compatible
This commit is contained in:
commit
9e1f1f2255
|
@ -73,7 +73,7 @@ abstract class ActionScheduler_Logger {
|
|||
$this->log( $action_id, __( 'action complete', 'action-scheduler' ) );
|
||||
}
|
||||
|
||||
public function log_failed_action( $action_id, \Exception $exception ) {
|
||||
public function log_failed_action( $action_id, Exception $exception ) {
|
||||
$this->log( $action_id, sprintf( __( 'action failed: %s', 'action-scheduler' ), $exception->getMessage() ) );
|
||||
}
|
||||
|
||||
|
@ -95,4 +95,4 @@ abstract class ActionScheduler_Logger {
|
|||
$this->log( $action_id, __( 'action ignored', 'action-scheduler' ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -685,7 +685,7 @@ class ActionScheduler_wpPostStore extends ActionScheduler_Store {
|
|||
$status = $this->get_post_column( $action_id, 'post_status' );
|
||||
|
||||
if ( $status === null ) {
|
||||
throw new \InvalidArgumentException( __( 'Invalid action ID. No status found.', 'action-scheduler' ) );
|
||||
throw new InvalidArgumentException( __( 'Invalid action ID. No status found.', 'action-scheduler' ) );
|
||||
}
|
||||
|
||||
return $this->get_action_status_by_post_status( $status );
|
||||
|
|
Loading…
Reference in New Issue