Skip to content

Commit 3dd2f69

Browse files
committed
Add type checks for perflab_aao_disabled_options option
1 parent 88ce574 commit 3dd2f69

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • includes/site-health/audit-autoloaded-options

‎includes/site-health/audit-autoloaded-options/helper.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,17 @@ function perflab_aao_get_autoloaded_options_table(): string {
203203
function perflab_aao_get_disabled_autoloaded_options_table(): string {
204204
$disabled_options = get_option( 'perflab_aao_disabled_options', array() );
205205

206-
if ( empty( $disabled_options ) ) {
206+
if ( ! is_array( $disabled_options ) ) {
207207
return '';
208208
}
209209

210210
$disabled_options_summary = array();
211211
wp_prime_option_caches( $disabled_options );
212212

213213
foreach ( $disabled_options as $option_name ) {
214+
if ( ! is_string( $option_name ) ) {
215+
continue;
216+
}
214217
$option_value = get_option( $option_name );
215218

216219
if ( false !== $option_value ) {

0 commit comments

Comments
 (0)