Skip to content

Commit

Permalink
PHP: Fix deprecation of optional parameters
Browse files Browse the repository at this point in the history
A required parameter can't be defined after an optional one. Only one use of this private call fortunately.
  • Loading branch information
GaryJones committed Feb 11, 2024
1 parent e1085ae commit 9de31be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/class-syndication-logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public static function log_post_info( $post_id, $status = '', $message = '', $lo
* @param array $extra additional data
*/
private function log_post( $msg_type, $post_id, $status, $message, $log_time, $extra ) {
$this->log( $storage_type = 'object', $msg_type, $object_type = 'post', $object_id = $post_id, $status, $message, $log_time, $extra );
$this->log( $storage_type = 'object', $msg_type, 'post', $post_id, $status, $message, $log_time, $extra );
}

/**
Expand All @@ -248,7 +248,7 @@ private function log_post( $msg_type, $post_id, $status, $message, $log_time, $e
* @param array $extra additional data
* @return mixed true or WP_Error
*/
private function log( $storage_type, $msg_type, $object_type = 'post', $object_id = '', $status, $message, $log_time, $extra ) {
private function log( $storage_type, $msg_type, $object_type, $object_id, $status, $message, $log_time, $extra ) {
// Don't log infos depending on debug level
if ( 'info' == $msg_type && 'info' != $this->debug_level ) {
return;
Expand Down

0 comments on commit 9de31be

Please sign in to comment.