Skip to content

Commit

Permalink
Remove check that stream_get_contents($value) returns false
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Nov 21, 2024
1 parent 7d817d9 commit 7de3b03
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/QueryBuilder/AbstractQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,7 @@ protected function prepareResource(mixed $value): string
throw new InvalidArgumentException('Supported only stream resource type.');

Check warning on line 496 in src/QueryBuilder/AbstractQueryBuilder.php

View check run for this annotation

Codecov / codecov/patch

src/QueryBuilder/AbstractQueryBuilder.php#L496

Added line #L496 was not covered by tests
}

$value = stream_get_contents($value);

if ($value === false) {
throw new InvalidArgumentException('Cannot read stream contents.');
}

return $this->prepareBinary($value);
return $this->prepareBinary(stream_get_contents($value));
}

/**
Expand Down

0 comments on commit 7de3b03

Please sign in to comment.