summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_url.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class
index 5d7b4dd..29429d2 100644
--- a/it_url.class
+++ b/it_url.class
@@ -81,7 +81,7 @@ function is_reachable($timeout = 5)
static function _postprocess($data, $p)
{
if ($p['postprocess'])
- $data = ($t = $p['postprocess']($data, ['it_error' => $p['retries'] > 0 ? false : ['title' => "invalid content from " . $p['url']]])) && $p['checkonly'] ? $data : $t;
+ $data = ($t = $p['postprocess']($data, ['it_error' => $p['retries'] > 0 ? false : (array)$p['it_error'] + ['title' => "invalid content from " . $p['url']]])) && $p['checkonly'] ? $data : $t;
return $data;
}
@@ -409,7 +409,7 @@ static function get_multi($p=null)
$key = $keys[$info['handle']];
$content = curl_multi_getcontent($info['handle']);
if (isset($p['postprocess']))
- $content = $p['postprocess']($content, ['it_error' => $retries[$key] < $p['retries'] ? false : ['title' => "invalid content from " . $urls[$key]]]);
+ $content = $p['postprocess']($content, ['it_error' => $retries[$key] < $p['retries'] ? false : (array)$p['it_error'] + ['title' => "invalid content from " . $urls[$key]]]);
EDC('reqtimings', $key, $info['result'], (gettimeofday(true) - $start) * 1000);
if ($info['result'] == CURLE_OK && $content !== null) {