Make sure ldd output isn't null (#92)

old-stable24
Varun Patil 2022-10-22 14:53:16 -07:00
parent 1209fa98ac
commit d44bdbada0
1 changed files with 6 additions and 5 deletions

View File

@ -415,11 +415,12 @@ class Exif
// Detect glibc or musl // Detect glibc or musl
$libc = null; $libc = null;
$ldd = shell_exec('ldd --version'); if ($ldd = shell_exec('ldd --version 2>&1')) {
if (false !== stripos($ldd, 'musl')) { if (false !== stripos($ldd, 'musl')) {
$libc = 'musl'; $libc = 'musl';
} elseif (false !== stripos($ldd, 'glibc')) { } elseif (false !== stripos($ldd, 'glibc')) {
$libc = 'glibc'; $libc = 'glibc';
}
} }
// Get static binary if available // Get static binary if available