Skip to content

Commit 0dcef15

Browse files
authored
fix type error
1 parent 35b9ae1 commit 0dcef15

File tree

1 file changed

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

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,11 @@ function perflab_aao_query_autoloaded_options(): array {
147147
$large_options = array();
148148

149149
foreach ( $all_options as $option_name => $option_value ) {
150-
if ( strlen( $option_value ) > $option_threshold ) {
150+
$serialized_value = maybe_serialize( $option_value );
151+
if ( strlen( $serialized_value ) > $option_threshold ) {
151152
$large_options[] = (object) array(
152153
'option_name' => $option_name,
153-
'option_value_length' => strlen( $option_value ),
154+
'option_value_length' => strlen( $serialized_value ),
154155
);
155156
}
156157
}

0 commit comments

Comments
 (0)