aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_cookie.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions_cookie.inc.php')
-rw-r--r--include/functions_cookie.inc.php5
1 files changed, 4 insertions, 1 deletions
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