summaryrefslogtreecommitdiff
path: root/program/include/main.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/main.inc')
-rw-r--r--program/include/main.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 1149429ff..80b9e61b7 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -829,12 +829,13 @@ function format_email_recipient($email, $name='')
function console()
{
$args = func_get_args();
+
if (class_exists('rcmail', false))
- rcmail::get_instance()->plugins->exec_hook('console', $args);
+ rcmail::get_instance()->plugins->exec_hook('console', $args);
$msg = array();
foreach ($args as $arg)
- $msg[] = !is_string($arg) ? var_export($arg, true) : $arg;
+ $msg[] = !is_string($arg) ? var_export($arg, true) : $arg;
if (!($GLOBALS['CONFIG']['debug_level'] & 4))
write_log('console', join(";\n", $msg));