From c3a0b9c9c9ea0ae1e858cb4a281c09338b1cd822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Wrede?= Date: Fri, 12 Jan 2024 15:35:41 +0100 Subject: [PATCH] A record is an Object, not an Array, so we should use property_exists() instead array_key_exists. --- classes/class-cli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/class-cli.php b/classes/class-cli.php index f344b79b6..af60c994b 100644 --- a/classes/class-cli.php +++ b/classes/class-cli.php @@ -134,7 +134,7 @@ public function query( $args, $assoc_args ) { // Catch any fields missing in records. foreach ( $fields as $field ) { - if ( ! array_key_exists( $field, $record ) ) { + if ( ! property_exists( $record, $field ) ) { $record->$field = null; } }