Skip to content

Commit 5e80585

Browse files
Tischoifabpot
authored andcommitted
Update AnnotationDirectoryLoader.php
1 parent ff4b815 commit 5e80585

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,16 @@ public function load($path, $type = null)
6666
*/
6767
public function supports($resource, $type = null)
6868
{
69+
if (!is_string($resource)) {
70+
return false;
71+
}
72+
6973
try {
7074
$path = $this->locator->locate($resource);
7175
} catch (\Exception $e) {
7276
return false;
7377
}
7478

75-
return is_string($resource) && is_dir($path) && (!$type || 'annotation' === $type);
79+
return is_dir($path) && (!$type || 'annotation' === $type);
7680
}
7781
}

0 commit comments

Comments
 (0)