Skip to content

Commit

Permalink
Avoid deprecation notice when validating null artifact paths
Browse files Browse the repository at this point in the history
  • Loading branch information
bsweeney committed Apr 24, 2024
1 parent 572b025 commit e159393
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Options.php
Expand Up @@ -1194,6 +1194,9 @@ public function getHttpContext()

public function validateArtifactPath(?string $path, string $option)
{
if ($path === null) {
return true;
}
$parsed_uri = parse_url($path);
if ($parsed_uri === false || (array_key_exists("scheme", $parsed_uri) && strtolower($parsed_uri["scheme"]) === "phar")) {
return false;
Expand Down

1 comment on commit e159393

@seansch
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I was just about to open a PR for this.

Please sign in to comment.