Skip to content

Commit

Permalink
php cs fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
PrestaSafe committed Sep 10, 2024
1 parent 75daa5a commit 98d7ac2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/PrettyBlocksModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ public static function copyZone($zone_name, $zone_name_to_paste, $id_lang, $id_s
$results = $db->executeS($query);
$result = true;
$lastPosition = self::getLastPosition($zone_name, $id_lang, $id_shop);

foreach ($results as $row) {
$model = new PrettyBlocksModel(null, $id_lang, $id_shop);
$model->zone_name = $zone_name_to_paste;
Expand All @@ -988,7 +988,7 @@ public static function copyZone($zone_name, $zone_name_to_paste, $id_lang, $id_s
$model->id_shop = (int) $id_shop;
$model->id_lang = (int) $id_lang;
$model->position = $row['position'] + $lastPosition;
$lastPosition++;
++$lastPosition;
if (!$model->save()) {
$errors[] = $model;
}
Expand Down

0 comments on commit 98d7ac2

Please sign in to comment.