From 21995b881bd677d4050a74aa6c3ceffd4a37ee91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Apr 2024 12:45:52 +0200 Subject: [PATCH] Try to fix phan warning --- htdocs/categories/class/categorie.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index abc096b527b..ffd097dcf7a 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1377,7 +1377,7 @@ class Categorie extends CommonObject * So if the result have the same id, update is not for label, and if result have an other one, * update may be for label. */ - if (!empty($obj) && $obj[0] > 0 && $obj[0] != $this->id) { + if (!empty($obj) && !empty($obj[0]) && $obj[0] > 0 && $obj[0] != $this->id) { dol_syslog(get_class($this)."::already_exists category with name=".$this->label." and parent ".$this->fk_parent." exists: rowid=".$obj[0]." current_id=".$this->id, LOG_DEBUG); return 1; }