mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 19:29:58 +03:00
include/functions_cookie: use proper brackets for offset access
Fixes #1134
This commit is contained in:
parent
29cc543a14
commit
8573e35b18
2 changed files with 4 additions and 4 deletions
|
@ -257,7 +257,7 @@ SELECT id_uppercat, MAX(`rank`)+1 AS next_rank
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$insert['uppercats'] = $insert['id'];
|
$insert['uppercats'] = $insert['id'];
|
||||||
$insert{'rank'} = $next_rank['NULL']++;
|
$insert['rank'] = $next_rank['NULL']++;
|
||||||
$insert['global_rank'] = $insert['rank'];
|
$insert['global_rank'] = $insert['rank'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ SELECT id_uppercat, MAX(`rank`)+1 AS next_rank
|
||||||
);
|
);
|
||||||
|
|
||||||
// add the new category to $db_categories and $db_fulldirs array
|
// add the new category to $db_categories and $db_fulldirs array
|
||||||
$db_categories[$insert{'id'}] =
|
$db_categories[$insert['id']] =
|
||||||
array(
|
array(
|
||||||
'id' => $insert['id'],
|
'id' => $insert['id'],
|
||||||
'parent' => (isset($parent)) ? $parent : Null,
|
'parent' => (isset($parent)) ? $parent : Null,
|
||||||
|
@ -278,7 +278,7 @@ SELECT id_uppercat, MAX(`rank`)+1 AS next_rank
|
||||||
'global_rank' => $insert['global_rank']
|
'global_rank' => $insert['global_rank']
|
||||||
);
|
);
|
||||||
$db_fulldirs[$fulldir] = $insert['id'];
|
$db_fulldirs[$fulldir] = $insert['id'];
|
||||||
$next_rank[$insert{'id'}] = 1;
|
$next_rank[$insert['id']] = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,7 +54,7 @@ function cookie_path()
|
||||||
$scr = substr($scr,0,strrpos( $scr,'/'));
|
$scr = substr($scr,0,strrpos( $scr,'/'));
|
||||||
|
|
||||||
// add a trailing '/' if needed
|
// add a trailing '/' if needed
|
||||||
if ((strlen($scr) == 0) or ($scr{strlen($scr)-1} !== '/'))
|
if ((strlen($scr) == 0) or ($scr[strlen($scr)-1] !== '/'))
|
||||||
{
|
{
|
||||||
$scr .= '/';
|
$scr .= '/';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue