aboutsummaryrefslogtreecommitdiffstats
path: root/MainView.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2011-05-24 19:10:05 +0300
committerFilipp Lepalaan <filipp@mac.com>2011-05-24 19:10:05 +0300
commitd462d86f086c812599f226861539829d427915e7 (patch)
treefa58374e9570ec26f61a4d904e6c767d2b54014c /MainView.php
parent00eeae9fadc2c505f6c659bc68079584a5a63ff0 (diff)
downloadmain-d462d86f086c812599f226861539829d427915e7.tar.gz
main-d462d86f086c812599f226861539829d427915e7.tar.bz2
main-d462d86f086c812599f226861539829d427915e7.zip
fix mainview/tag with null content
Diffstat (limited to 'MainView.php')
-rw-r--r--MainView.php11
1 files changed, 8 insertions, 3 deletions
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}</{$name}>\n";