From c429f534bc15ca8c64e3c2909676a436589fd6d2 Mon Sep 17 00:00:00 2001 From: Robert Heim Date: Sun, 23 Aug 2015 21:27:14 +0200 Subject: [PATCH] ensure int-type --- service/tags_manager.php | 2 +- tests/functional/acp/settings_test.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/service/tags_manager.php b/service/tags_manager.php index 747ec1e..3436612 100644 --- a/service/tags_manager.php +++ b/service/tags_manager.php @@ -768,7 +768,7 @@ private function set_tags_enabled_in_all_forums($enable) $this->db->sql_query($sql); $affected_rows = $this->db->sql_affectedrows(); $this->calc_count_tags(); - return $affected_rows; + return (int) $affected_rows; } /** diff --git a/tests/functional/acp/settings_test.php b/tests/functional/acp/settings_test.php index ab1dd22..e51cd91 100644 --- a/tests/functional/acp/settings_test.php +++ b/tests/functional/acp/settings_test.php @@ -75,8 +75,7 @@ public function test_enable_disable_in_forum() $this->assertEquals('0', $field->getValue()); $field->setValue(1); $crawler = $this->submit($form); - // TODO waiting for https://www.phpbb.com/community/viewtopic.php?f=461&t=2300126 - //$this->assertContains(sprintf($this->lang['TOPICTAGS_DISABLE_IN_ALL_FORUMS_DONE'][1], 1), $crawler->text()); + $this->assertContains(sprintf($this->lang['TOPICTAGS_DISABLE_IN_ALL_FORUMS_DONE'][1], 1), $crawler->text()); // must be disabled in all forums $crawler = $this->goto_settings_page(); $this->assertContains($this->lang('TOPICTAGS_DISABLE_IN_ALL_FORUMS_ALREADY'), $crawler->text()); @@ -93,8 +92,7 @@ public function test_enable_disable_in_forum() $this->assertEquals('0', $field->getValue()); $field->setValue(1); $crawler = $this->submit($form); - // TODO waiting for https://www.phpbb.com/community/viewtopic.php?f=461&t=2300126 - //$this->assertContains(sprintf($this->lang['TOPICTAGS_ENABLE_IN_ALL_FORUMS_DONE'][1], 1), $crawler->text()); + $this->assertContains(sprintf($this->lang['TOPICTAGS_ENABLE_IN_ALL_FORUMS_DONE'][1], 1), $crawler->text()); // must be enabled in all forums $crawler = $this->goto_settings_page(); $this->assertContains($this->lang('TOPICTAGS_ENABLE_IN_ALL_FORUMS_ALREADY'), $crawler->text());