From 41904a166706ecd8579bf8b364eb1c8138b1e7b4 Mon Sep 17 00:00:00 2001 From: Gael PICOT <gael.picot@free.fr> Date: Mon, 11 Jul 2022 16:16:33 +0200 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20de=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index c727c40..4e25327 100644 --- a/index.php +++ b/index.php @@ -120,8 +120,8 @@ function paralelle(HalRequestIterator $a, HalRequestIterator $b, array $fields, ]; foreach($fields as $field) { $values = [ - 'a' => isset(get_object_vars($doc_a)[$field])?get_object_vars($doc_a)[$field]:"", - 'b' => isset(get_object_vars($doc_b)[$field])?get_object_vars($doc_b)[$field]:"" + 'a' => isset($doc_a->$field)?$doc_a->$field:"", + 'b' => isset($doc_b->$field)?$doc_b->$field:"" ]; foreach($values as $queryName => $value) { if(is_array($value)) { -- GitLab