Update src/Database/Database.php

Co-Authored-By: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Michael Vogel
2020-04-29 19:13:23 +02:00
committed by GitHub
parent 6487daa4a9
commit e1d21e736a

View File

@@ -1654,10 +1654,7 @@ class Database
public function getVariable(string $name)
{
$result = $this->fetchFirst("SHOW GLOBAL VARIABLES WHERE `Variable_name` = ?", $name);
if (!isset($result['Value'])) {
return null;
}
return $result['Value'];
return $result['Value'] ?? null;
}
/**