|
From: <rgr...@us...> - 2014-03-15 15:52:20
|
Revision: 12377
http://sourceforge.net/p/xoops/svn/12377
Author: rgriffith
Date: 2014-03-15 15:52:18 +0000 (Sat, 15 Mar 2014)
Log Message:
-----------
Rework to remove inadvertent dependency on PHP 5.4+ feature
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/include/common.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/include/common.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/include/common.php 2014-03-14 09:32:52 UTC (rev 12376)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/include/common.php 2014-03-15 15:52:18 UTC (rev 12377)
@@ -197,8 +197,13 @@
array(&$sess_handler, 'destroy'),
array(&$sess_handler, 'gc'));
-if (session_status() !== PHP_SESSION_ACTIVE) {
- session_start();
+if (function_exists('session_status')) {
+ if (session_status() !== PHP_SESSION_ACTIVE) {
+ session_start();
+ }
+} else {
+ // this should silently fail if session has already started (for PHP 5.3)
+ @session_start();
}
/**
|