From a1a46e1eaa7eda93b554f3eacb7d9e787b67db15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Bernigaud?= <come.bernigaud@opensides.be>
Date: Mon, 20 Oct 2014 14:56:05 +0200
Subject: [PATCH] Fixes #3424 Avoiding PHP errors in setup

---
 html/main.php                     | 2 +-
 setup/class_setupStep_Migrate.inc | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/html/main.php b/html/main.php
index 6699dc6eb..bedec82dc 100644
--- a/html/main.php
+++ b/html/main.php
@@ -344,7 +344,7 @@ if (isset($_POST) && count($_POST)) {
   }
 }
 
-/* Assign erros to smarty */
+/* Assign errors to smarty */
 if (session::is_set('errors')) {
   $smarty->assign("errors", session::get('errors'));
 }
diff --git a/setup/class_setupStep_Migrate.inc b/setup/class_setupStep_Migrate.inc
index d3f8f781d..a96518509 100644
--- a/setup/class_setupStep_Migrate.inc
+++ b/setup/class_setupStep_Migrate.inc
@@ -298,10 +298,9 @@ class Step_Migrate extends setupStep
   {
     if (empty($this->checks) || isset($_POST['reload'])) {
       $this->initialize_checks();
-      foreach ($this->checks as &$check) {
+      foreach ($this->checks as $check) {
         $check->run();
       }
-      unset($check);
     }
     return parent::execute();
   }
@@ -310,10 +309,9 @@ class Step_Migrate extends setupStep
   {
     $this->is_completed = TRUE;
     parent::save_object();
-    foreach ($this->checks as &$check) {
+    foreach ($this->checks as $check) {
       $check->save_object();
     }
-    unset($check);
   }
 
   /* Check if the root object exists.
-- 
GitLab