do not treat 0 as empty footer

This commit is contained in:
Diana 2015-05-20 14:57:43 +00:00
parent 68b9b27a93
commit 3a706ef159
2 changed files with 6 additions and 2 deletions

View file

@ -11,6 +11,6 @@ class NodeFooter extends Node {
public function isEmpty( $data ) {
$links = trim( $data['value'] );
return empty( $links );
return empty( $links ) && $links != '0';
}
}

View file

@ -25,7 +25,11 @@ class NodeFooterTest extends WikiaBaseTest {
],
[
'string' => '<footer>0</footer>',
'expectedOutput' => true
'expectedOutput' => false
],
[
'string' => '<footer>\'0\'</footer>',
'expectedOutput' => false
],
[
'string' => '<footer></footer>',