/** * Leaves the critical section, other threads can now enter it. * @return void */ public static function leaveCriticalSection() { if (!self::$criticalSections) { throw new \InvalidStateException('Critical section has not been initialized.'); } flock(self::$criticalSections, LOCK_UN); fclose(self::$criticalSections); self::$criticalSections = NULL; }
/** * Internal error handler. Do not call directly. * @ignore internal */ public static function _errorHandler($severity, $message) { if (($severity & error_reporting()) !== $severity) { return NULL; } if (ini_get('html_errors')) { $message = html_entity_decode(strip_tags($message), ENT_QUOTES, 'UTF-8'); } if (($a = strpos($message, ': ')) !== FALSE) { $message = substr($message, $a + 2); } self::$errorMsg = $message; }