From a272b620f5835f42084ad93d421d4b32c82b2141 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Dec 2022 05:00:36 +0100 Subject: [PATCH] Fix code not reachable --- htdocs/core/class/lessc.class.php | 5 ++--- htdocs/hrm/class/skill.class.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/lessc.class.php b/htdocs/core/class/lessc.class.php index bd2d6d020cd..40c4d21abaa 100644 --- a/htdocs/core/class/lessc.class.php +++ b/htdocs/core/class/lessc.class.php @@ -703,8 +703,8 @@ class Lessc // has default value $value = $a[2]; } else { - $this->throwError("Failed to assign arg ".$a[1]); $value = null; // :( + $this->throwError("Failed to assign arg ".$a[1]); // This end function by throwing an exception } $value = $this->reduce($value); @@ -1118,8 +1118,7 @@ class Lessc if (isset($items[0])) { return $this->lib_e($items[0]); } - $this->throwError("unrecognised input"); - return null; + $this->throwError("unrecognised input"); // This end function by throwing an exception case "string": $arg[1] = ""; return $arg; diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 2c86c5dca56..0cdc63ec24e 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -521,7 +521,7 @@ class Skill extends CommonObject */ public function delete(User $user, $notrigger = false) { - return $this->deleteCommon($user, $notrigger);; + return $this->deleteCommon($user, $notrigger); } /**