Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/168'
Browse files Browse the repository at this point in the history
Close #168
Fixes #169
  • Loading branch information
weierophinney committed Jan 22, 2019
2 parents 5f7654e + 470621b commit fe80a6b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 2.9.1 - TBD
## 2.9.1 - 2019-01-22

### Added

Expand All @@ -22,7 +22,9 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- Nothing.
- [#168](https://github.com/zendframework/zend-http/pull/168) fixes a problem when validating the connection timeout for the `Curl` and
`Socket` client adapters; it now correctly identifies both integer and string
integer values.

## 2.9.0 - 2019-01-08

Expand Down
2 changes: 1 addition & 1 deletion src/Client/Adapter/Curl.php
Expand Up @@ -209,7 +209,7 @@ public function connect($host, $port = 80, $secure = false)
$connectTimeout = null;
}

if ($connectTimeout !== null && (! is_int($connectTimeout) || ! is_numeric($connectTimeout))) {
if ($connectTimeout !== null && ! is_numeric($connectTimeout)) {
throw new AdapterException\InvalidArgumentException(sprintf(
'integer or numeric string expected, got %s',
gettype($connectTimeout)
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Adapter/Socket.php
Expand Up @@ -263,7 +263,7 @@ public function connect($host, $port = 80, $secure = false)
$connectTimeout = $this->config['timeout'];
}

if ($connectTimeout !== null && (! is_int($connectTimeout) || ! is_numeric($connectTimeout))) {
if ($connectTimeout !== null && ! is_numeric($connectTimeout)) {
throw new AdapterException\InvalidArgumentException(sprintf(
'integer or numeric string expected, got %s',
gettype($connectTimeout)
Expand Down

0 comments on commit fe80a6b

Please sign in to comment.