From 5b15e688afcfb43d0d2ba0681cab29c906c0f79e Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Tue, 7 Aug 2018 09:38:18 +0200 Subject: [PATCH] FIX : PHP warning, undefined index notnull --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b84d31ddae3..b4426a02f74 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6291,7 +6291,7 @@ abstract class CommonObject if (! empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') $values[$key]=''; //var_dump($key.'-'.$values[$key].'-'.($this->fields[$key]['notnull'] == 1)); - if ($this->fields[$key]['notnull'] == 1 && ! isset($values[$key]) && is_null($val['default'])) + if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && ! isset($values[$key]) && is_null($val['default'])) { $error++; $this->errors[]=$langs->trans("ErrorFieldRequired", $this->fields[$key]['label']);