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

Commit 165bdc2

Browse files
committed
Merge branch 'hotfix/168' into develop
Forward port #168 Conflicts: CHANGELOG.md
2 parents 27b63d2 + 470621b commit 165bdc2

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ All notable changes to this project will be documented in this file, in reverse
2424

2525
- Nothing.
2626

27-
## 2.9.1 - TBD
27+
## 2.9.1 - 2019-01-22
2828

2929
### Added
3030

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

4545
### Fixed
4646

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

4951
## 2.9.0 - 2019-01-08
5052

src/Client/Adapter/Curl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public function connect($host, $port = 80, $secure = false)
209209
$connectTimeout = null;
210210
}
211211

212-
if ($connectTimeout !== null && (! is_int($connectTimeout) || ! is_numeric($connectTimeout))) {
212+
if ($connectTimeout !== null && ! is_numeric($connectTimeout)) {
213213
throw new AdapterException\InvalidArgumentException(sprintf(
214214
'integer or numeric string expected, got %s',
215215
gettype($connectTimeout)

src/Client/Adapter/Socket.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public function connect($host, $port = 80, $secure = false)
263263
$connectTimeout = $this->config['timeout'];
264264
}
265265

266-
if ($connectTimeout !== null && (! is_int($connectTimeout) || ! is_numeric($connectTimeout))) {
266+
if ($connectTimeout !== null && ! is_numeric($connectTimeout)) {
267267
throw new AdapterException\InvalidArgumentException(sprintf(
268268
'integer or numeric string expected, got %s',
269269
gettype($connectTimeout)

0 commit comments

Comments
 (0)