mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
Fix missing SPC_EXTRA_LIBS with type error bug
This commit is contained in:
parent
4c54d99621
commit
5f9fe2948c
@ -61,7 +61,7 @@ class curl extends Extension
|
||||
public function patchBeforeMake(): bool
|
||||
{
|
||||
$patched = parent::patchBeforeMake();
|
||||
$extra_libs = getenv('SPC_EXTRA_LIBS');
|
||||
$extra_libs = getenv('SPC_EXTRA_LIBS') ?: '';
|
||||
if ($this->builder instanceof WindowsBuilder && !str_contains($extra_libs, 'secur32.lib')) {
|
||||
$extra_libs .= ' secur32.lib';
|
||||
putenv('SPC_EXTRA_LIBS=' . trim($extra_libs));
|
||||
|
||||
@ -49,7 +49,7 @@ class imap extends Extension
|
||||
if (PHP_OS_FAMILY !== 'Linux' || SystemUtil::isMuslDist()) {
|
||||
return $patched;
|
||||
}
|
||||
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lcrypt');
|
||||
$extra_libs = trim((getenv('SPC_EXTRA_LIBS') ?: '') . ' -lcrypt');
|
||||
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user