public static function process_booking_unauthorized_exceptions() { if (!self::$old_exception_handler) { self::$old_exception_handler = set_exception_handler(array(__CLASS__, 'handle_booking_unauthorized_exception')); if (!self::$old_exception_handler) { //The exception handler of phpgw has probably not been activated, //so taking that as a hint to not enable any of our own either. restore_exception_handler(); } } }