mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-10 18:35:35 +08:00
fix crash on windoof
This commit is contained in:
@@ -116,6 +116,9 @@ class BuildPHPCommand extends BuildCommand
|
|||||||
$a = explode('\\', $class);
|
$a = explode('\\', $class);
|
||||||
return end($a) === $ext;
|
return end($a) === $ext;
|
||||||
});
|
});
|
||||||
|
if (!$extension) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$reflector = new \ReflectionClass($extension);
|
$reflector = new \ReflectionClass($extension);
|
||||||
$attributes = $reflector->getAttributes();
|
$attributes = $reflector->getAttributes();
|
||||||
return array_find($attributes, fn ($attr) => $attr->getName() === DynamicExt::class) !== null;
|
return array_find($attributes, fn ($attr) => $attr->getName() === DynamicExt::class) !== null;
|
||||||
|
|||||||
Reference in New Issue
Block a user