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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

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;
}
/**