Browse Source

Made Handler::varExporter return the value if a varExporter is not defined

2.1.0
Dustin Wilson 10 months ago
parent
commit
375618905f
  1. 10
      lib/Catcher/Handler.php

10
lib/Catcher/Handler.php

@ -308,13 +308,13 @@ abstract class Handler {
echo $string;
}
protected function varExporter(mixed $value): string|bool {
$exporter = $this->_varExporter;
set_error_handler([ $this, 'handleError' ]);
$value = $exporter($value);
restore_error_handler();
if ($exporter !== null) {
set_error_handler([ $this, 'handleError' ]);
$value = $exporter($value);
restore_error_handler();
}
return $value;
}

Loading…
Cancel
Save