mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fixes for PHP 8.3
This commit is contained in:
parent
76256a7ee6
commit
6d23b285c1
@ -201,7 +201,7 @@ function getFlagImage($country): string
|
||||
* @param mixed $v Variable to check.
|
||||
* @return bool Value boolean status.
|
||||
*/
|
||||
function getBoolean($v): bool
|
||||
function getBoolean(mixed $v): bool
|
||||
{
|
||||
if(is_bool($v)) {
|
||||
return $v;
|
||||
@ -210,6 +210,10 @@ function getBoolean($v): bool
|
||||
if(is_numeric($v))
|
||||
return (int)$v > 0;
|
||||
|
||||
if (is_null($v)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$v = strtolower($v);
|
||||
return $v === 'yes' || $v === 'true';
|
||||
}
|
||||
|
@ -41,9 +41,10 @@
|
||||
class OTS_Monster extends DOMDocument
|
||||
{
|
||||
private $loaded = false;
|
||||
public function loadXML($source , $options = 0)
|
||||
public function loadXML(string $source , int $options = 0): bool
|
||||
{
|
||||
$this->loaded = parent::loadXML($source, $options);
|
||||
return $this->loaded;
|
||||
}
|
||||
|
||||
public function loaded()
|
||||
|
Loading…
x
Reference in New Issue
Block a user