From 4c5bdf6ed91372fabd155656564e06ad8cc36ef8 Mon Sep 17 00:00:00 2001 From: Kailey Lampert Date: Sat, 4 Nov 2023 15:19:22 -0700 Subject: [PATCH] fix for getting strlen of null values in autoloaded options. addresses #4995 (#5002) --- qm-plugins/qm-alloptions/class-qm-collector-alloptions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qm-plugins/qm-alloptions/class-qm-collector-alloptions.php b/qm-plugins/qm-alloptions/class-qm-collector-alloptions.php index 9d77c2baa8..93595c1367 100644 --- a/qm-plugins/qm-alloptions/class-qm-collector-alloptions.php +++ b/qm-plugins/qm-alloptions/class-qm-collector-alloptions.php @@ -24,7 +24,7 @@ public function process() { $options = []; foreach ( $alloptions as $name => $val ) { - $size = mb_strlen( $val ); + $size = is_null( $val ) ? 0 : mb_strlen( $val ); $total_size += $size; $option = new stdClass();