From 5fdeae15fcfb248693612b9ee621702331a1c8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Wrede?= Date: Mon, 24 Oct 2022 09:24:26 +0200 Subject: [PATCH] Fix: PHP 8.1 Deprecation - strncmp(): Passing null to parameter (#44829) * Fix: PHP 8.1 Deprecation --- lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php b/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php index f06ecc93713f8d..8e12d99a074905 100644 --- a/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php +++ b/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php @@ -1090,7 +1090,7 @@ protected static function compute_style_properties( $styles, $settings = array() * @param array $styles Styles subtree. * @param array $path Which property to process. * @param array $theme_json Theme JSON array. - * @return string Style property value. + * @return string|array|null Style property value. */ protected static function get_property_value( $styles, $path, $theme_json = null ) { $value = _wp_array_get( $styles, $path ); @@ -1113,7 +1113,7 @@ protected static function get_property_value( $styles, $path, $theme_json = null } } - if ( is_array( $value ) ) { + if ( ! $value || is_array( $value ) ) { return $value; }