正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
| @@ -181,7 +181,10 @@ class TranslateLogic extends BaseLogic | @@ -181,7 +181,10 @@ class TranslateLogic extends BaseLogic | ||
| 181 | $textContentArray = array_filter($matches[1], function($item) { | 181 | $textContentArray = array_filter($matches[1], function($item) { |
| 182 | return !empty(trim($item)); | 182 | return !empty(trim($item)); |
| 183 | }); | 183 | }); |
| 184 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($textContentArray, true) . PHP_EOL, FILE_APPEND); | 184 | + // 过滤掉包含逗号加换行的内容 |
| 185 | + $textContentArray = array_filter($textContentArray, function($item) { | ||
| 186 | + return strpos($item, ',') === false && strpos($item, PHP_EOL) === false; | ||
| 187 | + }); | ||
| 185 | $contentData = []; | 188 | $contentData = []; |
| 186 | foreach ($textContentArray as $v){ | 189 | foreach ($textContentArray as $v){ |
| 187 | $content = trim($v); | 190 | $content = trim($v); |
-
请 注册 或 登录 后发表评论