fix in case it's not set

This commit is contained in:
DubbleClick 2025-07-01 17:57:36 +07:00
parent 5bc4504e37
commit e5ea32e9c0
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ class ClangNativeToolchain implements ToolchainInterface
{ {
foreach (['CC', 'CXX', 'AR', 'LD'] as $env) { foreach (['CC', 'CXX', 'AR', 'LD'] as $env) {
$command = getenv($env); $command = getenv($env);
if (is_file($command)) { if (!$command || is_file($command)) {
continue; continue;
} }
match (PHP_OS_FAMILY) { match (PHP_OS_FAMILY) {

View File

@ -24,7 +24,7 @@ class GccNativeToolchain implements ToolchainInterface
{ {
foreach (['CC', 'CXX', 'AR', 'LD'] as $env) { foreach (['CC', 'CXX', 'AR', 'LD'] as $env) {
$command = getenv($env); $command = getenv($env);
if (is_file($command)) { if (!$command || is_file($command)) {
continue; continue;
} }
match (PHP_OS_FAMILY) { match (PHP_OS_FAMILY) {