mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02: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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user