From 88ec10c6aaec3252aa6cd7448b782003523a2d9b Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Tue, 7 Jun 2011 15:21:36 +1000 Subject: [PATCH] display errors in plain-text for CLI users --- inc/display.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/display.php b/inc/display.php index fb1a3379..763fcd97 100644 --- a/inc/display.php +++ b/inc/display.php @@ -66,6 +66,12 @@ global $board, $mod, $config; if(function_exists('sql_close')) sql_close(); + + if(defined('STDIN')) { + // Running from CLI + die('Error: ' . $message); + } + die(Element('page.html', Array( 'config'=>$config, 'title'=>'Error',