replaced array_key_exists with property_exists for object

This commit is contained in:
Shreesh Arora
2023-03-03 18:33:58 +05:30
parent 7f7122d602
commit 993ef2ddf9
7 changed files with 11 additions and 11 deletions

View File

@@ -3611,7 +3611,7 @@ class AdminControllerCore extends Controller
{
/* Classical fields */
foreach ($_POST as $key => $value) {
if (array_key_exists($key, $object) && $key != 'id_'.$table) {
if (property_exists($object, $key) && $key != 'id_'.$table) {
/* Do not take care of password field if empty */
if ($key == 'passwd' && Tools::getValue('id_'.$table) && empty($value)) {
continue;