Skip to content

Commit

Permalink
Merge pull request #5 from Ppito/develop
Browse files Browse the repository at this point in the history
fixed issue 3 & 4
  • Loading branch information
Ppito authored Mar 25, 2021
2 parents 5e6b640 + d6389bf commit bda998b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions assets/css/laminas-whoops.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.Whoops pre.sf-dump {
background: initial;
}
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.3 || ^8.0",
"laminas/laminas-eventmanager": "^3.2",
"laminas/laminas-servicemanager": "^3.4",
"laminas/laminas-mvc": "^3.1",
"laminas/laminas-console": "^2.8",
"filp/whoops": "^2.7"
},
"autoload": {
Expand Down
3 changes: 3 additions & 0 deletions src/Handler/PageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public function configure(): void {
$handler = $this->getHandler();

$handler->setApplicationPaths([__FILE__]);
$handler->addResourcePath(__DIR__ . '/../../assets/');
$handler->addCustomCss('css/laminas-whoops.css');


if (!isset($this->options['editor'])) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function prepareException(MvcEvent $e) {
if ($response->isSuccess()) {
$response->setStatusCode(HttpResponse::STATUS_CODE_500);
}
} elseif ($response instanceof ConsoleResponse) {
} elseif (class_exists(ConsoleResponse::class) && $response instanceof ConsoleResponse) {
$statusCode = $response->getErrorLevel();
if ($statusCode === 0) {
$response->setErrorLevel(E_ERROR);
Expand Down

0 comments on commit bda998b

Please sign in to comment.