Browse Source

update: opcache fail abort

Tokumeikoi 4 years ago
parent
commit
29fc4206c0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/Http/Controllers/Admin/ConfigController.php

+ 3 - 1
app/Http/Controllers/Admin/ConfigController.php

@@ -147,7 +147,9 @@ class ConfigController extends Controller
             abort(500, '修改失败');
         }
         if (function_exists('opcache_reset')) {
-            opcache_reset();
+            if (!opcache_reset()) {
+                abort(500, '保存失败,请删除或检查opcache状态');
+            }
         }
         \Artisan::call('config:cache');
         return response([