Skip to content

Commit 41b82d5

Browse files
committed
fix error_logging error
1 parent a588afe commit 41b82d5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

includes/utils.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,12 +1088,12 @@ function log( $message ) {
10881088
*
10891089
* @hook powered_cache_log_message_type
10901090
*
1091-
* @param {null|int} null default message type
1091+
* @param {int} 0 default message type since 3.6
10921092
*
1093-
* @return {null|int} New value.
1093+
* @return {int} New value.
10941094
* @since 2.0
10951095
*/
1096-
$message_type = apply_filters( 'powered_cache_log_message_type', null );
1096+
$message_type = apply_filters( 'powered_cache_log_message_type', 0 );
10971097
$destination = null;
10981098

10991099
if ( defined( 'POWERED_CACHE_LOG_FILE' ) ) {
@@ -1118,6 +1118,8 @@ function log( $message ) {
11181118
return false;
11191119
}
11201120

1121+
$message_type = absint( $message_type );
1122+
11211123
return error_log( $log_message, $message_type, $log_destination ); // phpcs:ignore
11221124
}
11231125

0 commit comments

Comments
 (0)