aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-05-14 21:09:21 +0000
committerrub <rub@piwigo.org>2007-05-14 21:09:21 +0000
commit13a7e043ac4da994c2c5a8f337c914ff833c6384 (patch)
tree66e4df1b46d2c6323dfdc0bf57890865516549bb /include
parent2f9084b5e9691b8b1b2c5fa30d6ce96272bf1ac4 (diff)
Issue 0000619: bad result of cookie_path() function
Manage gallery install on directly on root directory Apply modifications from BSF (2006) ;-) git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2011 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/functions_session.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php
index ad1822f30..d1dff7979 100644
--- a/include/functions_session.inc.php
+++ b/include/functions_session.inc.php
@@ -113,7 +113,10 @@ function cookie_path()
$scr = substr($scr,0,strrpos( $scr,'/'));
// add a trailing '/' if needed
- $scr .= ($scr{strlen($scr)-1} == '/') ? '' : '/';
+ if ((strlen($scr) == 0) or ($scr{strlen($scr)-1} !== '/'))
+ {
+ $scr .= '/';
+ }
if ( substr(PHPWG_ROOT_PATH,0,3)=='../')
{ // this is maybe a plugin inside pwg directory