diff options
author | Nathan Gass | 2017-08-22 14:39:51 +0200 |
---|---|---|
committer | Nathan Gass | 2017-08-22 14:39:51 +0200 |
commit | ed51c3013e9b7b64235bf2f30543f392a07c1e95 (patch) | |
tree | 7c5da67057d37634f833b448b7e23e346154b98a | |
parent | 2d2f6da0c0871059a454f3c05c537ab917ad876f (diff) | |
download | itools-ed51c3013e9b7b64235bf2f30543f392a07c1e95.tar.gz itools-ed51c3013e9b7b64235bf2f30543f392a07c1e95.tar.bz2 itools-ed51c3013e9b7b64235bf2f30543f392a07c1e95.zip |
check for wrong use of it_url::get
-rw-r--r-- | it_url.class | 2 |
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); |