more php8.1 compatibility

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-04-29 18:01:59 +02:00
parent 3065b5fbf9
commit 9b064cdcce
3 changed files with 2 additions and 9 deletions

View File

@@ -27,7 +27,7 @@ namespace Froxlor\Cron;
use ReflectionClass;
class TaskId
final class TaskId
{
/**
* TYPE=1 MEANS TO REBUILD APACHE VHOSTS.CONF

View File

@@ -138,7 +138,7 @@ class DbManagerMySQL
*/
public function deleteDatabase($dbname = null)
{
if (Database::getAttribute(PDO::ATTR_SERVER_VERSION) < '5.0.2') {
if (version_compare(Database::getAttribute(PDO::ATTR_SERVER_VERSION), '5.0.2', '<')) {
// failsafe if user has been deleted manually (requires MySQL 4.1.2+)
$stmt = Database::prepare("REVOKE ALL PRIVILEGES, GRANT OPTION FROM `" . $dbname . "`");
Database::pexecute($stmt, [], false);