From bb4c8d9114335b9b3dacfafd5e5acd0614291c99 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 17 Mar 2021 12:48:59 +0100 Subject: [PATCH] FIX avoid warning with php 8 --- htdocs/core/class/defaultvalues.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/defaultvalues.class.php b/htdocs/core/class/defaultvalues.class.php index 92ea543d1a3..da9d0ad9f19 100644 --- a/htdocs/core/class/defaultvalues.class.php +++ b/htdocs/core/class/defaultvalues.class.php @@ -264,7 +264,7 @@ class DefaultValues extends CommonObject foreach ($filter as $key => $value) { if ($key == 't.rowid' || ($key == 't.entity' && !is_array($value)) || ($key == 't.user_id' && !is_array($value))) { $sqlwhere[] = $key.'='.$value; - } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + } elseif (isset($this->fields[$key]) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; } elseif ($key == 't.page' || $key == 't.param' || $key == 't.type') { $sqlwhere[] = $key.' = \''.$this->db->escape($value).'\'';