@@ -132,9 +132,9 @@ |
||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | // If unserialize failed, try to fix and retry |
| 135 | - $callback = function ($matches) { |
|
| 135 | + $callback = function($matches) { |
|
| 136 | 136 | $matches[2] = trim(preg_replace('/\s\s+/', ' ', $matches[2])); |
| 137 | - return 's:' . mb_strlen($matches[2]) . ':"' . $matches[2] . '";'; |
|
| 137 | + return 's:'.mb_strlen($matches[2]).':"'.$matches[2].'";'; |
|
| 138 | 138 | }; |
| 139 | 139 | |
| 140 | 140 | $data = preg_replace_callback('!s:(\d+):"(.*?)";!s', $callback, $data); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $totalArticlesProcessed = 0; |
| 76 | 76 | $isProcessing = true; |
| 77 | 77 | |
| 78 | - // while ($totalArticlesProcessed < $totalArticles) { |
|
| 78 | + // while ($totalArticlesProcessed < $totalArticles) { |
|
| 79 | 79 | $sql = "SELECT id, extra FROM swp_article"; |
| 80 | 80 | $query = $entityManager->getConnection()->prepare($sql); |
| 81 | 81 | $query->execute(); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $entityManager->clear(); |
| 117 | 117 | break; |
| 118 | 118 | } |
| 119 | - // } |
|
| 119 | + // } |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | private function unserializeExtraField(?string $data) |