Skip to content

Commit

Permalink
autoptimize metabox value has to be an array , doesn't it?
Browse files Browse the repository at this point in the history
  • Loading branch information
futtta committed Apr 9, 2024
1 parent 83852ba commit a2693b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/autoptimizeMetabox.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public function get_metabox_default_values()
}

public function check_ao_opt_sanity( $ao_opt_val ) {
if ( empty( $ao_opt_val ) ) {
if ( empty( $ao_opt_val ) || ! is_array( $ao_opt_val ) ) {
$ao_opt_val = $this->get_metabox_default_values();
} else {
foreach ( array( 'ao_post_optimize', 'ao_post_js_optimize', 'ao_post_css_optimize', 'ao_post_ccss', 'ao_post_lazyload' ) as $key ) {
Expand Down

0 comments on commit a2693b2

Please sign in to comment.