summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it.class b/it.class
index 5de9087..e43b794 100644
--- a/it.class
+++ b/it.class
@@ -1050,8 +1050,8 @@ static function time()
/**
* Output formatted and localized date
- * @param format optional format (default is 2007-01-02 03:04:05).
- * Other formats are "date", "datetime", "time".
+ * @param format optional format to be passed to date(), default "Y-m-d H:i:s"
+ * Other formats are "date", "datetime" and "time" in local language
* Formats can be qualified with language, e.g. "date:en"
* Special formats without language support are "icsdate", "icsdatetime".
* @param stamp optional unix timestamp (default is now).
@@ -1266,7 +1266,7 @@ static function json_encode($data, $p = [])
*/
static function json_decode($json, $p = [])
{
- return ($data = json_decode($json, $p['assoc'])) === null && trim($json) != 'null' ? it::error((array)$p['it_error'] + ['title' => "invalid json: " . json_last_error(), 'body' => $json]) : $data;
+ return ($data = json_decode($json, $p['assoc'])) === null && trim($json) != 'null' ? it::error((array)$p['it_error'] + ['title' => "invalid json: " . json_last_error_msg(), 'body' => $json]) : $data;
}
/**