From badf55178188376380e2162fae70e7b5f95dcbc8 Mon Sep 17 00:00:00 2001 From: rub Date: Mon, 14 May 2007 21:08:53 +0000 Subject: Issue 0000619: bad result of cookie_path() function Manage gallery install on directly on root directory git-svn-id: http://piwigo.org/svn/trunk@2010 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_cookie.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/functions_cookie.inc.php') diff --git a/include/functions_cookie.inc.php b/include/functions_cookie.inc.php index 4b8f70b1e..4d585e20f 100644 --- a/include/functions_cookie.inc.php +++ b/include/functions_cookie.inc.php @@ -63,7 +63,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 -- cgit v1.2.3