From e8781ab779f5211e76ce4bcf40af754369496eb7 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 19 Feb 2024 19:58:04 +0100 Subject: [PATCH] LScli::unquote_word: Fix PHP warning --- src/includes/class/class.LScli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/class/class.LScli.php b/src/includes/class/class.LScli.php index 78d1eda7..b9b82932 100644 --- a/src/includes/class/class.LScli.php +++ b/src/includes/class/class.LScli.php @@ -819,7 +819,7 @@ class LScli extends LSlog_staticLoggerClass { * @return string The quote character or an empty string if word if not quoted */ public static function unquote_word(&$word) { - if (in_array($word[0], array('"', "'"))) { + if ($word && in_array($word[0], array('"', "'"))) { $quote_char = $word[0]; $word = substr($word, 1); if ($word[strlen($word)-1] == $quote_char)