Skip to content

Commit e81ebf2

Browse files
committed
condition on mysqli adapter class existing instead of shopware version
1 parent 9d10293 commit e81ebf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Services/QueryManagerDb.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
use Shopware\Components\DependencyInjection\Container;
2020

21-
if (version_compare(\Shopware::VERSION, '5.3', '>=')) {
21+
if (!class_exists('Zend_Db_Adapter_Mysqli')) {
2222
require_once __DIR__ . '/../Library/Zend/Db/Adapter/Mysqli.php';
2323
require_once __DIR__ . '/../Library/Zend/Db/Adapter/Mysqli/Exception.php';
2424
require_once __DIR__ . '/../Library/Zend/Db/Statement/Mysqli.php';
@@ -58,7 +58,7 @@ public function __construct(Container $container, \Enlight_Components_Db_Adapter
5858
*/
5959
private function getConnection($query)
6060
{
61-
if(function_exists('mysqli_connect') && class_exists('Zend_Db_Adapter_Mysqli')) {
61+
if(function_exists('mysqli_connect')) {
6262
$config = $this->container->getParameter('shopware.db');
6363
$mysqli = new \Zend_Db_Adapter_Mysqli($config);
6464
$connection = $mysqli->getConnection();

0 commit comments

Comments
 (0)