Skip to content

Commit

Permalink
Merge pull request #306 from jingu/improve_unbound_exception_message
Browse files Browse the repository at this point in the history
Adjustments for changes to the Unbound exception message in CompileInjector
  • Loading branch information
koriym authored Oct 21, 2024
2 parents 62a7693 + 32e2066 commit 0627482
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AppAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use function assert;
use function sprintf;
use function str_contains;
use function str_ends_with;
use function str_replace;
use function ucwords;
Expand Down Expand Up @@ -57,7 +58,7 @@ public function get(AbstractUri $uri): ResourceObject
private function getNotFound(AbstractUri $uri, Unbound $e, string $class): Throwable
{
$unboundClass = $e->getMessage();
if ($unboundClass === "{$class}-") {
if (str_contains($unboundClass, "{$class}-")) {
return new ResourceNotFoundException((string) $uri, 404, $e);
}

Expand Down

0 comments on commit 0627482

Please sign in to comment.