From d462d86f086c812599f226861539829d427915e7 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 24 May 2011 19:10:05 +0300 Subject: fix mainview/tag with null content --- MainView.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'MainView.php') diff --git a/MainView.php b/MainView.php index b5db3ca..b403466 100644 --- a/MainView.php +++ b/MainView.php @@ -74,7 +74,10 @@ class MainView return $this->tag('input', $params); } - function tag($name, $args = '', $content = '', $selected = '') + /** + * Create an HTML tag + */ + function tag($name, $args = '', $content = FALSE, $selected = '') { $str_args = ''; $out = '<' . $name; @@ -105,8 +108,10 @@ class MainView } else { // } - - if (empty ($content)) return $out . $str_args . ' />'; + + if ($content === FALSE) { + return $out . $str_args . ' />'; + } return "{$out}{$str_args}>{$content}\n"; -- cgit v1.2.3