Merge pull request #509 from shreesh-webkul/gli-1118

Added: SQL_MODE for allow invalid dates in db backup
This commit is contained in:
Rohit Jain
2023-01-19 16:09:04 +05:30
committed by GitHub

View File

@@ -218,7 +218,8 @@ class PrestaShopBackupCore
$this->id = realpath($backupfile);
fwrite($fp, '/* Backup for '.Tools::getHttpHost(false, false).__PS_BASE_URI__."\n * at ".date($date)."\n */\n");
fwrite($fp, "\n".'SET NAMES \'utf8\';'."\n\n");
fwrite($fp, "\n".'SET NAMES \'utf8\';');
fwrite($fp, "\n".'SET SQL_MODE=\'ALLOW_INVALID_DATES\';'."\n\n");
// Find all tables
$tables = Db::getInstance()->executeS('SHOW TABLES');