You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently upgraded from 3.1.21 to 3.1.27 and noticed that if an array variable is named "sid" it doesn't output the value, upon downgrading to 3.1.21 or renaming "sid" to anything else it works again. I then tried version 3.1.23 and it failed, so a change between 3.1.21 and 3.1.23 is preventing this specific variable from working.
The problem is cause by the additional support of constants in Smarty ´templates.
session_start() does create an undocumented constant with name sid.
There is now a naming ambiguity if you write your array access like {$test[0].sid}
{$test[0]['sid']} will work.
Recently upgraded from 3.1.21 to 3.1.27 and noticed that if an array variable is named "sid" it doesn't output the value, upon downgrading to 3.1.21 or renaming "sid" to anything else it works again. I then tried version 3.1.23 and it failed, so a change between 3.1.21 and 3.1.23 is preventing this specific variable from working.
Test Info is below.
PHP Code:
array(0 => array("sid" => 38, "some" => "thing"));
array(0 => array("sid" => "38", "some" => "thing"));
Template Code:
{$test[0].sid} - outputs nothing
{$test[0].some} - outputs "thing"
The text was updated successfully, but these errors were encountered: