From 18f1952e2d90048ac4e24beb20f43bacf5c34d49 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 May 2019 14:49:18 +0200 Subject: [PATCH] Fix set of properties --- htdocs/admin/emailcollector_list.php | 2 +- htdocs/admin/mails_senderprofile_list.php | 2 +- htdocs/asset/list.php | 2 +- htdocs/bom/bom_list.php | 2 +- htdocs/compta/cashcontrol/cashcontrol_list.php | 2 +- htdocs/modulebuilder/template/myobject_list.php | 2 +- htdocs/product/inventory/list.php | 2 +- htdocs/societe/website.php | 2 +- htdocs/ticket/list.php | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index a7e6a1aff67..14cb63cd923 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -439,7 +439,7 @@ while ($i < min($num, $limit)) $object->id = $obj->rowid; foreach($object->fields as $key => $val) { - if (isset($obj->$key)) $object->$key = $obj->$key; + if (property_exists($obj, $key)) $object->$key = $obj->$key; } // Show here line of result diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index f6a526600d7..931d1168238 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -406,7 +406,7 @@ while ($i < min($num, $limit)) $object->id = $obj->rowid; foreach($object->fields as $key => $val) { - if (isset($obj->$key)) $object->$key = $obj->$key; + if (property_exists($obj, $key)) $object->$key = $obj->$key; } // Show here line of result diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index c0c67c52331..7ca92570aa4 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -421,7 +421,7 @@ while ($i < min($num, $limit)) $object->id = $obj->rowid; foreach($object->fields as $key => $val) { - if (isset($obj->$key)) $object->$key = $obj->$key; + if (property_exists($obj, $key)) $object->$key = $obj->$key; } // Show here line of result diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index 62e6a21ac22..1adbf08143d 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -444,7 +444,7 @@ while ($i < min($num, $limit)) $object->id = $obj->rowid; foreach($object->fields as $key => $val) { - if (isset($obj->$key)) $object->$key = $obj->$key; + if (property_exists($obj, $key)) $object->$key = $obj->$key; } // Show here line of result diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index 816d1486970..d18a8c38cfe 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -458,7 +458,7 @@ while ($i < min($num, $limit)) $object->id = $obj->rowid; foreach($object->fields as $key => $val) { - if (isset($obj->$key)) $object->$key = $obj->$key; + if (property_exists($obj, $key)) $object->$key = $obj->$key; } // Show here line of result diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 8fee6ca6664..f1b52911a0d 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -485,7 +485,7 @@ while ($i < min($num, $limit)) $object->id = $obj->rowid; foreach($object->fields as $key => $val) { - if (isset($obj->$key)) $object->$key = $obj->$key; + if (property_exists($obj, $key)) $object->$key = $obj->$key; } // Show here line of result diff --git a/htdocs/product/inventory/list.php b/htdocs/product/inventory/list.php index b102e6ebad4..7d097b6ecac 100644 --- a/htdocs/product/inventory/list.php +++ b/htdocs/product/inventory/list.php @@ -430,7 +430,7 @@ while ($i < min($num, $limit)) $object->id = $obj->rowid; foreach($object->fields as $key => $val) { - if (isset($obj->$key)) $object->$key = $obj->$key; + if (property_exists($obj, $key)) $object->$key = $obj->$key; } // Show here line of result diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index ef19f266597..fa868de6e42 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -441,7 +441,7 @@ while ($i < min($num, $limit)) $objectwebsiteaccount->id = $obj->rowid; foreach($objectwebsiteaccount->fields as $key => $val) { - if (isset($obj->$key)) $objectwebsiteaccount->$key = $obj->$key; + if (property_exists($obj, $key)) $object->$key = $obj->$key; } // Show here line of result diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 78fca5c7212..d6128037a5c 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -608,7 +608,7 @@ while ($i < min($num, $limit)) $object->id = $obj->rowid; foreach($object->fields as $key => $val) { - if (isset($obj->$key)) $object->$key = $obj->$key; + if (property_exists($obj, $key)) $object->$key = $obj->$key; } $langs->load("ticket");