Skip to content

Commit

Permalink
Fix: PHP 8.1 Deprecation - strncmp(): Passing null to parameter (#44829)
Browse files Browse the repository at this point in the history
* Fix: PHP 8.1 Deprecation
  • Loading branch information
Soean authored Oct 24, 2022
1 parent 98803a3 commit 5fdeae1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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;
}

Expand Down

0 comments on commit 5fdeae1

Please sign in to comment.