Skip to content
Snippets Groups Projects
Commit ae8c4195 authored by Jaime Pérez's avatar Jaime Pérez
Browse files

Make the SimpleSAML\Utils\HTTP::setCookie() method throw the new...

Make the SimpleSAML\Utils\HTTP::setCookie() method throw the new SimpleSAML\Error\CannotSetCookie exception.
parent a0360b7d
No related branches found
No related tags found
No related merge requests found
...@@ -1008,7 +1008,7 @@ class HTTP ...@@ -1008,7 +1008,7 @@ class HTTP
* @param bool $throw Whether to throw exception if setcookie() fails. * @param bool $throw Whether to throw exception if setcookie() fails.
* *
* @throws \InvalidArgumentException If any parameter has an incorrect type. * @throws \InvalidArgumentException If any parameter has an incorrect type.
* @throws \SimpleSAML_Error_Exception If the headers were already sent and the cookie cannot be set. * @throws \SimpleSAML\Error\CannotSetCookie If the headers were already sent and the cookie cannot be set.
* *
* @author Andjelko Horvat * @author Andjelko Horvat
* @author Jaime Perez, UNINETT AS <jaime.perez@uninett.no> * @author Jaime Perez, UNINETT AS <jaime.perez@uninett.no>
...@@ -1079,7 +1079,7 @@ class HTTP ...@@ -1079,7 +1079,7 @@ class HTTP
if (!$success) { if (!$success) {
if ($throw) { if ($throw) {
throw new \SimpleSAML_Error_Exception('Error setting cookie: headers already sent.'); throw new \SimpleSAML\Error\CannotSetCookie('Headers already sent.');
} else { } else {
Logger::warning('Error setting cookie: headers already sent.'); Logger::warning('Error setting cookie: headers already sent.');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment