Skip to content

Commit 89b5572

Browse files
Adjust PHP version in version compare for driver specific PDO constants
1 parent 1135959 commit 89b5572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/Icingadb/Common/Backend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function getDb(): Connection
6262
if ($config->db === 'mysql') {
6363
// In PHP 8.5+, driver-specific constants of the PDO class are deprecated,
6464
// but the replacements are only available since php 8.4
65-
if (version_compare(PHP_VERSION, '8.5.0', '<')) {
65+
if (version_compare(PHP_VERSION, '8.4.0', '<')) {
6666
$mysqlConstantPrefix = 'PDO::MYSQL_ATTR_';
6767
} else {
6868
$mysqlConstantPrefix = 'Pdo\Mysql::ATTR_';

0 commit comments

Comments
 (0)