diff options
-rw-r--r-- | phpBB/phpbb/template/base.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/template/context.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/template/template.php | 2 | ||||
-rw-r--r-- | tests/template/template_test.php | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/phpbb/template/base.php b/phpBB/phpbb/template/base.php index bc0f022cc4..41c0a01ba8 100644 --- a/phpBB/phpbb/template/base.php +++ b/phpBB/phpbb/template/base.php @@ -135,7 +135,7 @@ abstract class base implements template /** * {@inheritdoc} */ - public function find_key_index($blockname, $key = false) + public function find_key_index($blockname, $key) { return $this->context->find_key_index($blockname, $key); } diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php index 8bfbd73f1a..e70d0574be 100644 --- a/phpBB/phpbb/template/context.php +++ b/phpBB/phpbb/template/context.php @@ -278,7 +278,7 @@ class context * * @return mixed false if not found, index position otherwise; be sure to test with === */ - public function find_key_index($blockname, $key = false) + public function find_key_index($blockname, $key) { // For nested block, $blockcount > 0, for top-level block, $blockcount == 0 $blocks = explode('.', $blockname); diff --git a/phpBB/phpbb/template/template.php b/phpBB/phpbb/template/template.php index b5a6ab32dc..9e3d658ca8 100644 --- a/phpBB/phpbb/template/template.php +++ b/phpBB/phpbb/template/template.php @@ -187,7 +187,7 @@ interface template * * @return mixed false if not found, index position otherwise; be sure to test with === */ - public function find_key_index($blockname, $key = false); + public function find_key_index($blockname, $key); /** * Get path to template for handle (required for BBCode parser) diff --git a/tests/template/template_test.php b/tests/template/template_test.php index 33fa4b63a0..997da80246 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -637,8 +637,8 @@ EOT $this->assertEquals(1, $this->template->find_key_index('outer[2].middle', array('VARIABLE' => '2B')), 'Find index by key in middle loop'); $this->assertEquals(2, $this->template->find_key_index('outer.middle', true), 'Find index at the end of middle loop'); - $this->assertEquals(false, $this->template->find_key_index('outer.wrong'), 'Wrong middle block name'); - $this->assertEquals(false, $this->template->find_key_index('wrong.middle'), 'Wrong outer block name'); + $this->assertEquals(false, $this->template->find_key_index('outer.wrong', true), 'Wrong middle block name'); + $this->assertEquals(false, $this->template->find_key_index('wrong.middle', false), 'Wrong outer block name'); } public function assign_block_vars_array_data() { |