add php 8.5 support

This commit is contained in:
Beu
2026-01-19 21:22:47 +01:00
parent 53c5e54a3b
commit 928c72c501
6 changed files with 18 additions and 17 deletions

View File

@@ -23,7 +23,7 @@ class Connection
/** @var int[] */
private static $levels = [
null => -1,
'' => -1,
'User' => 0,
'Admin' => 1,
'SuperAdmin' => 2
@@ -60,7 +60,7 @@ class Connection
if (!is_string($user) || !isset(self::$levels[$user])) {
throw new InvalidArgumentException('user = ' . print_r($user, true));
}
if (self::$levels[$this->user] >= self::$levels[$user]) {
if ($this->user !== null && self::$levels[$this->user] >= self::$levels[$user]) {
return true;
}

View File

@@ -180,11 +180,11 @@ if (extension_loaded('xmlrpc')) {
return (bool)(int)$elt;
case 'i4':
case 'int':
return (int)$elt;
return (int) $elt;
case 'double':
return (double)$elt;
return (float) $elt;
case 'string':
return (string)$elt;
return (string) $elt;
case 'base64':
return new Base64(base64_decode($elt));
case 'dateTime.iso8601':