summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorNathan Gass2017-08-22 14:39:51 +0200
committerNathan Gass2017-08-22 14:39:51 +0200
commited51c3013e9b7b64235bf2f30543f392a07c1e95 (patch)
tree7c5da67057d37634f833b448b7e23e346154b98a /it_url.class
parent2d2f6da0c0871059a454f3c05c537ab917ad876f (diff)
downloaditools-ed51c3013e9b7b64235bf2f30543f392a07c1e95.tar.gz
itools-ed51c3013e9b7b64235bf2f30543f392a07c1e95.tar.bz2
itools-ed51c3013e9b7b64235bf2f30543f392a07c1e95.zip
check for wrong use of it_url::get
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class2
1 files changed, 2 insertions, 0 deletions
diff --git a/it_url.class b/it_url.class
index 976dceb..7873a1a 100644
--- a/it_url.class
+++ b/it_url.class
@@ -109,6 +109,8 @@ function is_reachable($timeout = 5)
*/
function get($p=null, $timeout=5)
{
+ if (!is_int($timeout))
+ it::error("Wrong value for second argument of it_url::get()!");
if (!is_array($p))
$p = array('url' => $p, 'timeout' => $timeout);
$p += array('retries' => 1, 'curl' => true);