summaryrefslogtreecommitdiffstats
path: root/modules-available
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available')
-rw-r--r--modules-available/sysconfig/inc/configmodule.inc.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules-available/sysconfig/inc/configmodule.inc.php b/modules-available/sysconfig/inc/configmodule.inc.php
index 729cb959..34970d0a 100644
--- a/modules-available/sysconfig/inc/configmodule.inc.php
+++ b/modules-available/sysconfig/inc/configmodule.inc.php
@@ -549,12 +549,15 @@ abstract class ConfigModule
EventLog::warning('generateFailed callback for module id ' . $args['moduleid'] . ', but no instance could be generated.');
return;
}
- if (isset($task['data']['error'])) {
- $error = $task['data']['error'];
- } elseif (isset($task['data']['messages'])) {
- $error = $task['data']['messages'];
- } else {
- $error = '';
+ $error = '';
+ if (!empty($task['data']['error'])) {
+ $error .= $task['data']['error'] . "\n\n";
+ }
+ if (!empty($task['data']['messages'])) {
+ $error .= $task['data']['messages'] . "\n\n";
+ }
+ if (empty($error)) {
+ $error = json_encode($task, JSON_PRETTY_PRINT);
}
EventLog::failure("Generating module '" . $module->moduleTitle . "' failed.", $error);
if ($args['deleteOnError'] ?? false) {