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; } }