summaryrefslogtreecommitdiff
path: root/app/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/functions.php')
-rw-r--r--app/functions.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/functions.php b/app/functions.php
index 4cbbbbfe..dc6431b9 100644
--- a/app/functions.php
+++ b/app/functions.php
@@ -6,6 +6,10 @@ use PicoDb\Database;
function debug($message)
{
+ if (! is_string($message)) {
+ $message = var_export($message, true);
+ }
+
error_log($message.PHP_EOL, 3, 'data/debug.log');
}