This changes makes sure the error is triggerd when the exception is
thrown, so that the problem code is in the stack-trace. Before, the
error happend in the exception hander, so you could not see the code
that caused the problem.
$this->module = $module;
$this->link = $link;
$this->a = $a;
- $this->debuginfo = $debuginfo;
+ $this->debuginfo = is_null($debuginfo) ? null : (string)$debuginfo;
if (get_string_manager()->string_exists($errorcode, $module)) {
$message = get_string($errorcode, $module, $a);
$module = 'error';
$a = $ex->getMessage();
$link = '';
- $debuginfo = null;
+ $debuginfo = '';
}
// Append the error code to the debug info to make grepping and googling easier