mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Don't accept empty key for Context::set() and Context::get()
https://xetown.com/questions/1130915
This commit is contained in:
parent
0f91ab3204
commit
8c5e32945b
1 changed files with 6 additions and 0 deletions
|
|
@ -1852,6 +1852,12 @@ class Context
|
|||
*/
|
||||
public static function set($key, $val, $set_to_get_vars = false)
|
||||
{
|
||||
if(empty($key))
|
||||
{
|
||||
trigger_error('Called Context::set() with an empty key', \E_USER_WARNING);
|
||||
return;
|
||||
}
|
||||
|
||||
self::$_tpl_vars->{$key} = $val;
|
||||
|
||||
if($set_to_get_vars || isset(self::$_get_vars->{$key}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue