From 4d56582966bc741c579712bd904aee9680af8f62 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Tue, 23 Jun 2015 12:27:24 +0200 Subject: fix ->result for totaltimeout and maxlength (should be same as return value), also fix interaction between maxlength and safety --- it_url.class | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/it_url.class b/it_url.class index a0c5844..5973887 100644 --- a/it_url.class +++ b/it_url.class @@ -383,14 +383,14 @@ function request($p=array()) } if (time() >= $endtime) - $result = false; + $result = $this->result = false; + + if ($p['maxlength'] && (strlen($this->data) + $len > $p['maxlength'])) + $result = $this->result = false; if ($result === false && $p['safety'] == 1) it::error(array('title' => "problem (timeout?) getting $url->url " . $errstr) + (array)$p['it_error']); - if ($p['maxlength'] && (strlen($this->data) + $len > $p['maxlength'])) - $result = false; - return $result; } -- cgit v1.2.3