Skip to content

Commit d533a05

Browse files
committed
skip line before preg_replacing
1 parent 3f74d58 commit d533a05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ public function getDynamicExportSymbolsArgument(): ?string
5151

5252
if ($out = shell_exec('nm -g --defined-only -P ' . escapeshellarg($libphp) . ' 2>/dev/null')) {
5353
foreach (preg_split('/\R/', trim($out)) as $line) {
54-
if ($line === '' || str_ends_with($line, '.o:')) {
54+
if ($line === '' || str_ends_with($line, '.o:') || str_ends_with($line, '.o]:')) {
5555
continue;
5656
}
5757
$name = strtok($line, " \t");
5858
if (!$name) {
5959
continue;
6060
}
6161
$name = preg_replace('/@.*$/', '', $name);
62-
if ($name !== '' && $name !== false && !str_starts_with($name, $libphp)) {
62+
if ($name !== '' && $name !== false) {
6363
$defined[] = $name;
6464
}
6565
}

0 commit comments

Comments
 (0)