CRM-13302 - php 5.3 error fix
authorDeepak Srivastava <deepak.srivastava@webaccess.co.in>
Fri, 13 Sep 2013 17:58:57 +0000 (23:28 +0530)
committerDeepak Srivastava <deepak.srivastava@webaccess.co.in>
Fri, 13 Sep 2013 17:58:57 +0000 (23:28 +0530)
CRM/Logging/Schema.php

index fe28b2f9fc9bd422be2c975f166a8653e6d173c7..5b98d126e1872c1e08aad0ec23f6655d8a7f8b51 100644 (file)
@@ -375,7 +375,8 @@ WHERE  table_schema IN ('{$this->db}', '{$civiDB}')";
     // NOTE: we consider only those columns for modifications where there is a spec change, and that the column definition 
     // wasn't deliberately modified by fixTimeStampAndNotNullSQL() method.
     foreach ($civiTableSpecs as $col => $colSpecs) {
-      if (!empty(array_diff($civiTableSpecs[$col], $logTableSpecs[$col])) && $col != 'id') {
+      $specDiff = array_diff($civiTableSpecs[$col], $logTableSpecs[$col]);
+      if (!empty($specDiff) && $col != 'id') {
         // ignore 'id' column for any spec changes, to avoid any auto-increment mysql errors
         if ($civiTableSpecs[$col]['DATA_TYPE'] != $logTableSpecs[$col]['DATA_TYPE']) {
           // if data-type is different, surely consider the column