diff --git a/lib/Authentication/CASAuthentication.php b/lib/Authentication/CASAuthentication.php index 272cf5724..f9d9c7b20 100644 --- a/lib/Authentication/CASAuthentication.php +++ b/lib/Authentication/CASAuthentication.php @@ -96,8 +96,13 @@ public function init($args) } else { phpCAS::proxy($args['CAS_PROTOCOL'], $args['CAS_HOST'], intval($args['CAS_PORT']), $args['CAS_PATH'], false); - if (!empty($args['CAS_PROXY_TICKET_PATH'])) - phpCAS::setPGTStorageFile('', $args['CAS_PROXY_TICKET_PATH']); + if (!empty($args['CAS_PROXY_TICKET_PATH'])) { + if (version_compare(PHPCAS_VERSION, '1.3', '>=')) { + phpCAS::setPGTStorageFile($args['CAS_PROXY_TICKET_PATH']); + } else { + phpCAS::setPGTStorageFile('', $args['CAS_PROXY_TICKET_PATH']); + } + } if (!empty($args['CAS_PROXY_FIXED_CALLBACK_URL'])) phpCAS::setFixedCallbackURL($args['CAS_PROXY_FIXED_CALLBACK_URL']);