aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template/context.php
diff options
context:
space:
mode:
authorjaviexin <javiexin@gmail.com>2017-05-31 20:24:55 +0200
committerMarc Alexander <admin@m-a-styles.de>2017-11-01 12:29:49 +0100
commita30693a5948861cf6e1f330bc54c8c539d60cdcc (patch)
tree6765714000ecc7aa201071a15285f93899fa3ba7 /phpBB/phpbb/template/context.php
parentc2043e47dabc23100ecc388ae1e9d8ae20c2257e (diff)
downloadforums-a30693a5948861cf6e1f330bc54c8c539d60cdcc.tar
forums-a30693a5948861cf6e1f330bc54c8c539d60cdcc.tar.gz
forums-a30693a5948861cf6e1f330bc54c8c539d60cdcc.tar.bz2
forums-a30693a5948861cf6e1f330bc54c8c539d60cdcc.tar.xz
forums-a30693a5948861cf6e1f330bc54c8c539d60cdcc.zip
[ticket/14994] Refactor template->assign_block_var
Refactor assign_block_var to use the same block selection mechanism as is used in alter_block_array. This allows creating new blocks at any position in the template structure, not only on the last block. Allows selecting a block as outer[2].middle. Added tests. Added PHP 7.2 compatibility. PHPBB3-14994
Diffstat (limited to 'phpBB/phpbb/template/context.php')
-rw-r--r--phpBB/phpbb/template/context.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php
index 5a15e12582..c1e971c148 100644
--- a/phpBB/phpbb/template/context.php
+++ b/phpBB/phpbb/template/context.php
@@ -209,7 +209,7 @@ class context
$name = $blocks[$i];
// Assign S_ROW_COUNT and S_ROW_NUM
- $s_row_count = isset($block[$name]) ? sizeof($block[$name]) : 0;
+ $s_row_count = isset($block[$name]) ? count($block[$name]) : 0;
$vararray['S_ROW_COUNT'] = $vararray['S_ROW_NUM'] = $s_row_count;
// Assign S_FIRST_ROW