diff --git a/.travis.yml b/.travis.yml index 4f67b010417a5eafb731118788272afe99ed384c..eadcb2accb218b4367130cf2777ed67e3d816694 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ php: - 5.6 - 7.0 - 7.1 +- 7.2 - hhvm matrix: allow_failures: diff --git a/lib/SimpleSAML/SessionHandlerPHP.php b/lib/SimpleSAML/SessionHandlerPHP.php index 350b0e43bed36e7d3e0285085107ed4c2a4b7f73..30f3d909ab56b9c0688bc118401f239937394295 100644 --- a/lib/SimpleSAML/SessionHandlerPHP.php +++ b/lib/SimpleSAML/SessionHandlerPHP.php @@ -76,13 +76,15 @@ class SessionHandlerPHP extends SessionHandler $params = $this->getCookieParams(); - session_set_cookie_params( - $params['lifetime'], - $params['path'], - $params['domain'], - $params['secure'], - $params['httponly'] - ); + if (!headers_sent()) { + session_set_cookie_params( + $params['lifetime'], + $params['path'], + $params['domain'], + $params['secure'], + $params['httponly'] + ); + } $savepath = $config->getString('session.phpsession.savepath', null); if (!empty($savepath)) { diff --git a/modules/core/lib/Auth/UserPassBase.php b/modules/core/lib/Auth/UserPassBase.php index bc05f61967cf976ac80f323a148759dfd215a5be..474d0a03bbfc66a043978f6ded6ed8699f00c469 100644 --- a/modules/core/lib/Auth/UserPassBase.php +++ b/modules/core/lib/Auth/UserPassBase.php @@ -196,7 +196,7 @@ abstract class sspmod_core_Auth_UserPassBase extends SimpleSAML_Auth_Source { } $attributes = $this->login($username, $password); - assert('is_array($attributes)'); + assert(is_array($attributes)); $state['Attributes'] = $attributes; return; diff --git a/modules/saml/lib/IdP/SAML2.php b/modules/saml/lib/IdP/SAML2.php index 30d95781daa371e5b9b0151b279ab283653b7fb1..9c6860585e63ecd24d834f960f43b5d035d1c0f4 100644 --- a/modules/saml/lib/IdP/SAML2.php +++ b/modules/saml/lib/IdP/SAML2.php @@ -443,7 +443,7 @@ class sspmod_saml_IdP_SAML2 public static function processSOAPAuthnRequest(array &$state) { if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) { - SimpleSAML_Logger::error("ECP AuthnRequest did not contain Basic Authentication header"); + SimpleSAML\Logger::error("ECP AuthnRequest did not contain Basic Authentication header"); // TODO Throw some sort of ECP-specific exception / convert this to SOAP fault throw new SimpleSAML_Error_Error("WRONGUSERPASS"); }