aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-07-03 22:57:21 +0000
committerplegall <plg@piwigo.org>2006-07-03 22:57:21 +0000
commit062990b02af2e397a6475a2e9dd4860d1efa2b00 (patch)
tree6a5d770c5b80702dec3437df47f193a351ec6744
parent4099398ffd858795f6bcb2291bdc8b481bd6597d (diff)
bug fixed: add the check of non emptiness on $_SERVER['PATH_INFO'] (and not
only its existence) before using it in strpos. git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1429 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/functions_session.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php
index 48271af6e..9768bf927 100644
--- a/include/functions_session.inc.php
+++ b/include/functions_session.inc.php
@@ -87,7 +87,7 @@ function cookie_path()
if ( isset($_SERVER['REDIRECT_URL']) )
{ // mod_rewrite is activated for upper level directories. we must set the
// cookie to the path shown in the browser otherwise it will be discarded.
- if ( isset($_SERVER['PATH_INFO']) )
+ if ( isset($_SERVER['PATH_INFO']) and !empty($_SERVER['PATH_INFO']) )
{
$idx = strpos( $_SERVER['REDIRECT_URL'], $_SERVER['PATH_INFO'] );
if ($idx !== false)