diff --git a/app/Services/TG/Hook/Dog.php b/app/Services/TG/Hook/Dog.php index eeaeaae4..6b46ac53 100644 --- a/app/Services/TG/Hook/Dog.php +++ b/app/Services/TG/Hook/Dog.php @@ -270,6 +270,11 @@ class Dog extends Mod\Base { } private function subStr($input) { + + if (!$input) { + return ""; + } + if (mb_strlen($input, 'UTF-8') > (int) $this->iStrMaxLen) { return mb_substr($input, 0, (int) $this->iStrMaxLen, 'UTF-8')."……"; @@ -322,9 +327,7 @@ class Dog extends Mod\Base { $sValue = $aParam["aArg"][1] ?? false; if ($sValue == "?") { - return "#add__{field} {value}"; - } if (!$sValue) { @@ -339,6 +342,7 @@ class Dog extends Mod\Base { $this->oModelSelf->save(); + $aParam = []; $aParam["aOption"][1] = $this->sPrimaryKey; $aParam["aArg"][1] = $this->oModelSelf->{$this->sPrimaryKey};