Skip to content

Commit

Permalink
ensure int-type
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertHeim committed Aug 23, 2015
1 parent 3d2530a commit c429f53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion service/tags_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
6 changes: 2 additions & 4 deletions tests/functional/acp/settings_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
Expand Down

0 comments on commit c429f53

Please sign in to comment.