[Fusionforge-commits] FusionForge branch Branch_5_2 updated. d569a7f19cd42baee18d1e9618576cbd95606a13

Roland Mas lolando at fusionforge.org
Wed Apr 17 11:53:33 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, Branch_5_2 has been updated
       via  d569a7f19cd42baee18d1e9618576cbd95606a13 (commit)
      from  4fa0de493a84e4efb8aa0614b4bfa73604ea05c4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d569a7f19cd42baee18d1e9618576cbd95606a13
Author: Roland Mas <lolando at debian.org>
Date:   Wed Apr 17 11:53:15 2013 +0200

    Handle PHP 5.1's restricted setcookie()

diff --git a/src/common/include/session.php b/src/common/include/session.php
index a090d2e..a085c9b 100644
--- 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);
+	}
 }
 
 /**

-----------------------------------------------------------------------

Summary of changes:
 src/common/include/session.php |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list