mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-13 20:05:35 +08:00
Fix missing SPC_EXTRA_LIBS with type error bug
This commit is contained in:
@@ -61,7 +61,7 @@ class curl extends Extension
|
|||||||
public function patchBeforeMake(): bool
|
public function patchBeforeMake(): bool
|
||||||
{
|
{
|
||||||
$patched = parent::patchBeforeMake();
|
$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')) {
|
if ($this->builder instanceof WindowsBuilder && !str_contains($extra_libs, 'secur32.lib')) {
|
||||||
$extra_libs .= ' secur32.lib';
|
$extra_libs .= ' secur32.lib';
|
||||||
putenv('SPC_EXTRA_LIBS=' . trim($extra_libs));
|
putenv('SPC_EXTRA_LIBS=' . trim($extra_libs));
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class imap extends Extension
|
|||||||
if (PHP_OS_FAMILY !== 'Linux' || SystemUtil::isMuslDist()) {
|
if (PHP_OS_FAMILY !== 'Linux' || SystemUtil::isMuslDist()) {
|
||||||
return $patched;
|
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);
|
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user