Skip to content

Commit

Permalink
update Stream Exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Nov 13, 2017
1 parent 4e9765b commit 0aa2c95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
All Notable changes to `Csv` will be documented in this file



## Next - TBD

### Added
Expand All @@ -18,6 +17,8 @@ All Notable changes to `Csv` will be documented in this file

- issue with `error_get_last` usage when using a modified PHP error handler see [#254](https://github.com/thephpleague/csv/issues/254) - fixed by [@csiszarattila](https://github.com/csiszarattila)

- Removed seekable word from Stream exception messages.

### Removed

- Nothing
Expand Down
4 changes: 2 additions & 2 deletions src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ class Stream implements SeekableIterator
public function __construct($resource)
{
if (!is_resource($resource)) {
throw new TypeError(sprintf('Argument passed must be a seekable stream resource, %s given', gettype($resource)));
throw new TypeError(sprintf('Argument passed must be a stream resource, %s given', gettype($resource)));
}

if ('stream' !== ($type = get_resource_type($resource))) {
throw new TypeError(sprintf('Argument passed must be a seekable stream resource, %s resource given', $type));
throw new TypeError(sprintf('Argument passed must be a stream resource, %s resource given', $type));
}

$this->is_seekable = stream_get_meta_data($resource)['seekable'];
Expand Down

0 comments on commit 0aa2c95

Please sign in to comment.