0 ) { --self::$active; } if ( 0 !== self::$active ) { return; } if ( self::$time_changed && null !== self::$orig_time && function_exists( 'set_time_limit' ) ) { // phpcs:ignore Squiz.PHP.DiscouragedFunctions.Discouraged -- Restores the value found before the job started. @set_time_limit( self::$orig_time ); } if ( self::$memory_changed && null !== self::$orig_memory ) { // phpcs:ignore WordPress.PHP.IniSet.memory_limit_Disallowed, Squiz.PHP.DiscouragedFunctions.Discouraged -- Restores the value found before the job started. @ini_set( 'memory_limit', self::$orig_memory ); } self::$time_changed = false; self::$memory_changed = false; } } /** Held in a local variable by the job. When it goes out of scope the limits go back. */ final class Sentinel_Limits_Guard { public function __destruct() { Sentinel_Limits::release(); } }