Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed mysql support, pdomysql now required #267

Merged
merged 3 commits into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions classes/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static function getDefaultTests()
),
'phpversion' => false,
'gd' => false,
'mysql_support' => false,
'pdo_mysql' => false,
'config_dir' => 'config',
'files' => false,
'mails_dir' => 'mails',
Expand Down Expand Up @@ -117,7 +117,6 @@ public static function getDefaultTestsOp()
'mbstring' => false,
'magicquotes' => false,
'dom' => false,
'pdo_mysql' => false,
);
}

Expand Down Expand Up @@ -156,7 +155,7 @@ public static function test_new_phpversion()

public static function test_mysql_support()
{
return extension_loaded('mysql') || extension_loaded('mysqli') || extension_loaded('pdo_mysql');
return extension_loaded('mysqli') || extension_loaded('pdo_mysql');
}

public static function test_pdo_mysql()
Expand Down
6 changes: 5 additions & 1 deletion classes/db/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,17 @@ protected static function loadSlaveServers()
*/
public static function getClass()
{
$class = 'MySQL';
$class = '';
if (PHP_VERSION_ID >= 50200 && extension_loaded('pdo_mysql')) {
$class = 'DbPDO';
} elseif (extension_loaded('mysqli')) {
$class = 'DbMySQLi';
}

if (empty($class)) {
throw new PrestaShopException('Cannot select any valid SQL engine.');
}

return $class;
}

Expand Down
Loading