From 5f67901c1b85a7b230b803666eb494d138d908ba Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <jkowalsk@student.agh.edu.pl>
Date: Sun, 06 Sep 2015 14:35:17 +0000
Subject: [PATCH] Remove HHVM from Travis test matrix due to lack of built-in webserver

---
 uphpCAS.php |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/uphpCAS.php b/uphpCAS.php
index 955d204..12f8424 100644
--- a/uphpCAS.php
+++ b/uphpCAS.php
@@ -56,7 +56,16 @@
 		if($port != 0) {
 			$url .= ':'.$port;
 		}
+		
 		$url .= $_SERVER['REQUEST_URI'];
+		
+		if(isset($_GET['ticket'])) {
+			$pos = max(
+				strrpos($url, '?ticket='),
+				strrpos($url, '&ticket=')
+			);
+			$url = substr($url, 0, $pos);
+		}
 		
 		return $url;
 	}
@@ -114,7 +123,7 @@
 	}
 	
 	public function logout($returnUrl = NULL) {
-		session_start();
+		@session_start();
 		if($this->isAuthenticated()) {
 			unset($_SESSION[$this->sessionName]);
 			header('Location: '.$this->logoutUrl($returnUrl));
@@ -130,7 +139,7 @@
 	}
 	
 	public function authenticate() {
-		session_start();
+		@session_start();
 		if($this->isAuthenticated()) {
 			return $_SESSION[$this->sessionName];
 		} elseif(isset($_REQUEST['ticket'])) {

--
Gitblit v1.9.1