X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FScopedPHPTimeout.php;h=d1493c30b7ad0efee52cde73bd70f636393f978c;hb=8fc8ddfa80ddc06ab9dab54288118288468fffcd;hp=97c6bbfc9b800e99836cedafbeb85f9169f834bb;hpb=d05de487c31db528919e7ec7ac64b78bb33fb9e5;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 ); } } }