UpdateDatabase/MysqlLinks.php
authorAlan Knowles <alan@roojs.com>
Fri, 7 Oct 2016 09:15:24 +0000 (17:15 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 7 Oct 2016 09:15:24 +0000 (17:15 +0800)
UpdateDatabase/MysqlLinks.php

index 58756ed..6ea3877 100644 (file)
@@ -263,11 +263,11 @@ class Pman_Core_UpdateDatabase_MysqlLinks {
                
             ";
             $has_checks=  false;
-            $err = array();
+            $errs = array();
             foreach($map as $source_col=>$target) {
                 // check that source_col exists in schema.
                 if (!isset($this->schema[$tbl][$source_col])) {
-                    $err[] = "SOURCE MISSING: $source_col => $target";
+                    $errs[] = "SOURCE MISSING: $source_col => $target";
                     continue;
                 }
                 
@@ -277,7 +277,7 @@ class Pman_Core_UpdateDatabase_MysqlLinks {
                 
                 if (!isset($this->schema[$target_table])) {
                     // skip... target table does not exist
-                    $err[] = "TARGET MISSING: $source_col => $target";
+                    $errs[] = "TARGET MISSING: $source_col => $target";
                     continue;
                 }
                 
@@ -313,7 +313,7 @@ class Pman_Core_UpdateDatabase_MysqlLinks {
             ";
             
             if (!$has_checks) {
-                echo "SKIP TRIGGER {$tbl}_before_insert (missing " . implode(", ", $err) . ")\n";
+                echo "SKIP TRIGGER {$tbl}_before_insert (missing " . implode(", ", $errs) . ")\n";
                 return;
             }
             //echo $trigger; exit;