Skip to content

Commit af0362d

Browse files
Update plugins/performance-lab/includes/site-health/audit-autoloaded-options/helper.php
Co-authored-by: Weston Ruter <[email protected]>
1 parent 0dcef15 commit af0362d

File tree

1 file changed

+3
-1
lines changed
  • plugins/performance-lab/includes/site-health/audit-autoloaded-options

1 file changed

+3
-1
lines changed

plugins/performance-lab/includes/site-health/audit-autoloaded-options/helper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ function perflab_aao_query_autoloaded_options(): array {
147147
$large_options = array();
148148

149149
foreach ( $all_options as $option_name => $option_value ) {
150-
$serialized_value = maybe_serialize( $option_value );
150+
if ( is_array( $option_value ) || is_object( $option_value ) ) {
151+
$option_value = serialize( $option_value ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
152+
}
151153
if ( strlen( $serialized_value ) > $option_threshold ) {
152154
$large_options[] = (object) array(
153155
'option_name' => $option_name,

0 commit comments

Comments
 (0)