aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MainApp.php5
-rw-r--r--MainDb.php2
-rw-r--r--MainView.php11
3 files changed, 12 insertions, 6 deletions
diff --git a/MainApp.php b/MainApp.php
index ac58db5..759a522 100644
--- a/MainApp.php
+++ b/MainApp.php
@@ -142,9 +142,10 @@ class MainApp
static function error($msg)
{
$err = array('error' => $msg);
+ header('HTTP/1.0 500 Internal Server Error');
// send it to the browser
- self::json($err);
- trigger_error($msg, E_USER_NOTICE);
+ //self::json($err);
+ //trigger_error($msg, E_USER_NOTICE);
// and log it locally
self::log($msg);
}
diff --git a/MainDb.php b/MainDb.php
index 06263a0..e1f293b 100644
--- a/MainDb.php
+++ b/MainDb.php
@@ -71,7 +71,7 @@ class MainDb
$sql = array_shift($args);
if (!is_string($sql)) {
- return false;
+ return FALSE;
}
if (!is_array($data)) {
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";