Quellcode durchsuchen

Fix for PHP 8 and disable_functions

Visman vor 3 Jahren
Ursprung
Commit
3ad83f7a70
2 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
  1. 3 1
      app/Models/Pages/Admin/Install.php
  2. 3 1
      app/Models/Pages/Admin/Maintenance.php

+ 3 - 1
app/Models/Pages/Admin/Install.php

@@ -626,7 +626,9 @@ class Install extends Admin
      */
     protected function installEnd(Validator $v): Page
     {
-        @\set_time_limit(0);
+        if (\function_exists('\\set_time_limit')) {
+            \set_time_limit(0);
+        }
 
         if (true !== $this->c->Cache->clear()) {
             throw new RuntimeException('Unable to clear cache');

+ 3 - 1
app/Models/Pages/Admin/Maintenance.php

@@ -215,7 +215,9 @@ class Maintenance extends Admin
             return $this->view([], 'GET');
         }
 
-        @\set_time_limit(0);
+        if (\function_exists('\\set_time_limit')) {
+            \set_time_limit(0);
+        }
 
         if (
             'POST' === $method