Fix redundant pre-built name calling

This commit is contained in:
crazywhalecc
2025-03-30 22:05:20 +08:00
parent 67afffeb96
commit 62d619b6cd
2 changed files with 3 additions and 3 deletions

View File

@@ -211,7 +211,7 @@ class SystemUtil
// Match Version * line
// match ldd version: "Version 1.2.3" match 1.2.3
$pattern = '/Version\s+(\d+\.\d+\.\d+)/';
if (preg_match($pattern, $result[1][1], $matches)) {
if (preg_match($pattern, $result[1][1] ?? '', $matches)) {
return $matches[1];
}
}