Skip to content
This repository was archived by the owner on Sep 8, 2023. It is now read-only.

Commit 7ab3eb7

Browse files
authored
Merge pull request #1 from mhkb/master
Added check to ensure the `macros` property exists
2 parents 1605478 + cf8aeac commit 7ab3eb7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Console/MacrosCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ public function handle()
5656

5757
foreach ($classes as $class) {
5858
$reflection = new \ReflectionClass($class);
59-
$property = $reflection->getProperty('macros');
59+
if ($reflection->hasProperty('macros')) {
60+
$property = $reflection->getProperty('macros');
61+
} else {
62+
continue;
63+
}
6064
$property->setAccessible(true);
6165
$macros = $property->getValue();
6266

0 commit comments

Comments
 (0)