Commit e2a39ac4 authored by metzlerd's avatar metzlerd
Browse files

Fixed missing error reporting function.

parent 25bd5117
......@@ -111,11 +111,11 @@ class FrxEditor {
$this->xpq = new DOMXPath($dom);
}
catch (Exception $e) {
forena_error('Invalid or malformed report document', '<pre>' .
Frx::error('Invalid or malformed report document', '<pre>' .
$e->getMessage() . $e->getTraceAsString() . '</pre>');
}
if (!$this->dom->documentElement) {
forena_error(t('Invalid or malformed report document'));
Frx::error(t('Invalid or malformed report document'));
return;
}
......@@ -223,7 +223,7 @@ class FrxEditor {
}
catch (Exception $e) {
forena_error('Malformed report body', '<pre>' . $e->getMessage() .
Frx::error('Malformed report body', '<pre>' . $e->getMessage() .
$e->getTraceAsString() . '</pre>');
}
// If there are no frx attributes in the body then replace them with the old values.
......@@ -1124,7 +1124,7 @@ class FrxEditor {
if (!$this->edit && user_access('design any report')) {
// Add the block or ID link
$o .= '<div class="forena-editor-links">'
. $this->l_icon("$report_link/edit", 'doc-option-edit.png', 'Edit', Frx::Data()->getContext('parm'));
. $this->l_icon("$report_link/edit", 'doc-option-edit.png', 'Edit', (array)Frx::Data()->getContext('parm'));
if (module_exists('locale')) $o .= $this->l_icon("$report_link/translations", 'doc-option-tab.png', 'Translations');
if (!$this->cache->include) $o .= $this->l_icon("$report_link/delete", 'doc-option-remove.png', 'Delete');
$o .= "</div>";
......
......@@ -196,7 +196,7 @@ function forena_settings_validate($form, &$form_state) {
mkdir($path);
} catch (Exception $e) {
forena_error(t('Unable to create report directory'), $e->getMessage());
Frx::error(t('Unable to create report directory'), $e->getMessage());
}
}
}
......@@ -215,7 +215,7 @@ function forena_settings_validate($form, &$form_state) {
}
} catch (Exception $e) {
forena_error(t('Unable to create data directory'), $e->getMessage());
Frx::error(t('Unable to create data directory'), $e->getMessage());
}
}
}
......
......@@ -622,7 +622,7 @@ class FrxRenderer {
}
catch (Exception $e) {
forena_error('Malformed report body', '<pre>' . $e->getMessage() .
Frx::error('Malformed report body', '<pre>' . $e->getMessage() .
$e->getTraceAsString() . '</pre>');
}
$body = $temp_dom->getElementsByTagName('body')->item(0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment