Browse Source

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

2.1.0
Dustin Wilson 11 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; echo $string;
} }
protected function varExporter(mixed $value): string|bool { protected function varExporter(mixed $value): string|bool {
$exporter = $this->_varExporter; $exporter = $this->_varExporter;
if ($exporter !== null) {
set_error_handler([ $this, 'handleError' ]); set_error_handler([ $this, 'handleError' ]);
$value = $exporter($value); $value = $exporter($value);
restore_error_handler(); restore_error_handler();
}
return $value; return $value;
} }

Loading…
Cancel
Save