mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 20:08:55 +00:00
[ticket/14950] Add possibility to delete a template block
Adds a new mode to alter_block_array to allow for the deletion of a certain block of template variables. The selection method is the same as for the other modes for alter_block_array. The passed in vararray is ignored, and an out of bounds index is considered an error. Added tests for the new function, fixed. PHPBB3-14950
This commit is contained in:
parent
988865fd0a
commit
136c74bd1c
1 changed files with 1 additions and 1 deletions
|
@ -413,7 +413,7 @@ class context
|
||||||
if ($mode == 'delete')
|
if ($mode == 'delete')
|
||||||
{
|
{
|
||||||
// If we are exceeding last iteration, do not delete anything
|
// If we are exceeding last iteration, do not delete anything
|
||||||
if ($key > sizeof($block))
|
if ($key > sizeof($block) || $key < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue