X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FScopedPHPTimeout.php;h=d1493c30b7ad0efee52cde73bd70f636393f978c;hb=8720241703a0ee05145bcbeed7b8f3384f5f4bc8;hp=97c6bbfc9b800e99836cedafbeb85f9169f834bb;hpb=10e91851b2568267e5ccb7bbd0ab24ec4f2a195a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ScopedPHPTimeout.php b/includes/ScopedPHPTimeout.php index 97c6bbfc9b..d1493c30b7 100644 --- a/includes/ScopedPHPTimeout.php +++ b/includes/ScopedPHPTimeout.php @@ -1,14 +1,38 @@ 0 ) { // recursion guard trigger_error( "Resursive invocation of " . __CLASS__ . " attempted." ); } else { + $this->oldIgnoreAbort = ignore_user_abort( true ); $this->oldTimeout = ini_set( 'max_execution_time', $seconds ); $this->startTime = microtime( true ); ++self::$stackDepth; @@ -53,6 +78,7 @@ class ScopedPHPTimeout { // take some measures to prevent this. Track total time and calls. self::$totalElapsed += $elapsed; --self::$stackDepth; + ignore_user_abort( $this->oldIgnoreAbort ); } } }