diff --git a/migration/20.03/migrateWorkingDays.php b/migration/20.03/migrateWorkingDays.php index ca495db87a81997593a9e5909dbf7bc950441884..770a80f515ee866efe26fe1e649893d400936249 100644 --- a/migration/20.03/migrateWorkingDays.php +++ b/migration/20.03/migrateWorkingDays.php @@ -14,7 +14,7 @@ foreach ($customs as $custom) { $workingDays = 1; $xmlfile = null; $path = "custom/{$custom}/apps/maarch_entreprise/xml/features.xml"; - if (file_exists($path)) { + if (is_file($path)) { $xmlfile = simplexml_load_file($path); if ($xmlfile) { @@ -36,6 +36,9 @@ foreach ($customs as $custom) { } } + \SrcCore\models\DatabasePDO::reset(); + new \SrcCore\models\DatabasePDO(['customId' => $custom]); + \Parameter\models\ParameterModel::delete(['id' => 'workingDays']); \Parameter\models\ParameterModel::create([ 'id' => 'workingDays',