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

Fix for timeout config parameter validation #168

Merged
merged 3 commits into from Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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