From ed51c3013e9b7b64235bf2f30543f392a07c1e95 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Tue, 22 Aug 2017 14:39:51 +0200 Subject: check for wrong use of it_url::get --- it_url.class | 2 ++ 1 file changed, 2 insertions(+) (limited to 'it_url.class') 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); -- cgit v1.2.3