projects
/
fusionforge
/
fusionforge.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
project home
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4fa0de4
)
Handle PHP 5.1's restricted setcookie()
author
Roland Mas
<lolando@debian.org>
Wed, 17 Apr 2013 09:53:15 +0000
(11:53 +0200)
committer
Roland Mas
<lolando@debian.org>
Wed, 17 Apr 2013 09:53:15 +0000
(11:53 +0200)
src/common/include/session.php
patch
|
blob
|
history
diff --git
a/src/common/include/session.php
b/src/common/include/session.php
index a090d2e3efe32cbe31453c9ff3e28df82b628e1f..a085c9b01168db4f8607e0831fc5c70acf415cca 100644
(file)
--- a/
src/common/include/session.php
+++ b/
src/common/include/session.php
@@
-387,7
+387,12
@@
function session_cookie($name, $value, $domain='', $expiration=0) {
if ($force_secure && !session_issecure()) {
return;
}
- setcookie($name, $value, $expiration, '/', $domain, $force_secure, true);
+ if (PHP_MAJOR_VERSION < 5 || PHP_MINOR_VERSION < 2) {
+ // In PHP < 5.2, setcookie accepts at most 6 parameters
+ setcookie($name, $value, $expiration, '/', $domain, $force_secure);
+ } else {
+ setcookie($name, $value, $expiration, '/', $domain, $force_secure, true);
+ }
}
/**