Revision: 3060
Author: olavmrk
Date: Thu Mar 29 02:02:39 2012
Log: SessionHandler: Remove version check for PHP >= 5.2 when calling
setcookie.
Since 5.2.0 is now the minimum supported version, this check is no longer
necessary.
Thanks to Ryan Panning for providing this patch.
http://code.google.com/p/simplesamlphp/source/detail?r=3060
Modified:
/trunk/lib/SimpleSAML/SessionHandler.php
=======================================
--- /trunk/lib/SimpleSAML/SessionHandler.php Thu Jul 28 08:48:34 2011
+++ /trunk/lib/SimpleSAML/SessionHandler.php Thu Mar 29 02:02:39 2012
@@ -150,13 +150,7 @@
$expire = time() + $params['lifetime'];;
}
- $version = explode('.', PHP_VERSION);
- if ((int)$version[0] === 5 && (int)$version[1] < 2) {
- $success = setcookie($name, $value, $expire, $params['path'],
$params['domain'], $params['secure']);
- } else {
- $success = setcookie($name, $value, $expire, $params['path'],
$params['domain'], $params['secure'], $params['httponly']);
- }
- if (!$success) {
+ if (!setcookie($name, $value, $expire, $params['path'],
$params['domain'], $params['secure'], $params['httponly'])) {
throw new SimpleSAML_Error_Exception('Error setting cookie - headers
already sent.');
}
}
--
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to simplesamlphp-commits@googlegroups.com.
To unsubscribe from this group, send email to
simplesamlphp-commits+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en.