mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 11:59:56 +00:00
do not treat 0 as empty footer
This commit is contained in:
parent
68b9b27a93
commit
3a706ef159
|
@ -11,6 +11,6 @@ class NodeFooter extends Node {
|
|||
|
||||
public function isEmpty( $data ) {
|
||||
$links = trim( $data['value'] );
|
||||
return empty( $links );
|
||||
return empty( $links ) && $links != '0';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>',
|
||||
|
|
Loading…
Reference in a new issue