Fix PHP warning related to logging severity threshold (#43448)
* Fix PHP warning related to logging default severity threshold * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
a6705cda15
commit
39ec01bceb
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
Comment: Fixes a PHP deprecation warning introduced in PR-42979.
|
||||
|
|
@ -78,7 +78,7 @@ abstract class WC_Log_Levels {
|
|||
* @return bool True if $level is a valid level.
|
||||
*/
|
||||
public static function is_valid_level( $level ) {
|
||||
return array_key_exists( strtolower( $level ), self::$level_to_severity );
|
||||
return is_string( $level ) && array_key_exists( strtolower( $level ), self::$level_to_severity );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue