Merge pull request #22160 from bordoni/lib-action-scheduler-php-52

Lib Action Scheduler PHP 5.2 Compatible
This commit is contained in:
Mike Jolley 2019-01-07 12:56:10 +00:00 committed by GitHub
commit 9e1f1f2255
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ abstract class ActionScheduler_Logger {
$this->log( $action_id, __( 'action complete', 'action-scheduler' ) ); $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() ) ); $this->log( $action_id, sprintf( __( 'action failed: %s', 'action-scheduler' ), $exception->getMessage() ) );
} }

View File

@ -685,7 +685,7 @@ class ActionScheduler_wpPostStore extends ActionScheduler_Store {
$status = $this->get_post_column( $action_id, 'post_status' ); $status = $this->get_post_column( $action_id, 'post_status' );
if ( $status === null ) { 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 ); return $this->get_action_status_by_post_status( $status );