PHP8/AjaxHandler

* filter callback function must be defined static
 * fixed some typos
 * fixed commentbody filter callback eating \n chars
This commit is contained in:
Sarjuuk
2021-10-24 19:23:53 +02:00
parent f9ed75d5af
commit 57864d2544
6 changed files with 19 additions and 19 deletions

View File

@@ -165,7 +165,7 @@ class AjaxAccount extends AjaxHandler
DB::Aowow()->query('DELETE FROM ?_account_favorites WHERE `userId` = ?d AND `type` = ?d AND `typeId` = ?d', User::$id, $type, $typeId);
}
protected function checkScale(string $val) : string
protected static function checkScale(string $val) : string
{
if (preg_match('/^((\w+:\d+)(,\w+:\d+)*)$/', $val))
return $val;
@@ -173,7 +173,7 @@ class AjaxAccount extends AjaxHandler
return '';
}
protected function checkName(string $val) : string
protected static function checkName(string $val) : string
{
$var = trim(urldecode($val));