Skip to content

Commit 4bf1855

Browse files
authored
Merge pull request #773 from laravel/fix/versioning
[2.x] Validates if there is a version before using it
2 parents 9cfbdf4 + 9c04a45 commit 4bf1855

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Commands/Concerns/InstallsFrankenPhpDependencies.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ protected function ensureFrankenPhpBinaryMeetsRequirements($frakenPhpBinary)
132132

133133
$version = explode(' ', $version)[1] ?? null;
134134

135-
if ($version === null) {
135+
if ($version === null || preg_match('/\d+\.\d+\.\d+/', $version) !== 1) {
136136
return $this->warn(
137137
'Unable to determine the current FrankenPHP binary version. Please report this issue: https://github.com/laravel/octane/issues/new.',
138138
);

0 commit comments

Comments
 (0)