Skip to content

Commit 6d0bdaa

Browse files
authored
Merge pull request #509 from shreesh-webkul/gli-1118
Added: SQL_MODE for allow invalid dates in db backup
2 parents 7245254 + 69a9966 commit 6d0bdaa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

classes/PrestaShopBackup.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ public function add()
218218
$this->id = realpath($backupfile);
219219

220220
fwrite($fp, '/* Backup for '.Tools::getHttpHost(false, false).__PS_BASE_URI__."\n * at ".date($date)."\n */\n");
221-
fwrite($fp, "\n".'SET NAMES \'utf8\';'."\n\n");
221+
fwrite($fp, "\n".'SET NAMES \'utf8\';');
222+
fwrite($fp, "\n".'SET SQL_MODE=\'ALLOW_INVALID_DATES\';'."\n\n");
222223

223224
// Find all tables
224225
$tables = Db::getInstance()->executeS('SHOW TABLES');

0 commit comments

Comments
 (0)