summaryrefslogtreecommitdiff
path: root/url.class
diff options
context:
space:
mode:
authorUrban Müller2007-01-02 19:00:16 +0000
committerUrban Müller2007-01-02 19:00:16 +0000
commit43847664f37639a4bbf70202e02e569087c4c0dc (patch)
tree18c4c8cb7c41d10f278e02c576f21e945b21ee5d /url.class
parent5f9d4842bf0a625214e80facb7dbdde934495432 (diff)
downloaditools-43847664f37639a4bbf70202e02e569087c4c0dc.tar.gz
itools-43847664f37639a4bbf70202e02e569087c4c0dc.tar.bz2
itools-43847664f37639a4bbf70202e02e569087c4c0dc.zip
alert unparseable urls
Diffstat (limited to 'url.class')
-rw-r--r--url.class3
1 files changed, 2 insertions, 1 deletions
diff --git a/url.class b/url.class
index 390d73b..ebe42a5 100644
--- a/url.class
+++ b/url.class
@@ -360,7 +360,8 @@ function get_cache($p = array())
else
touch($path);
- $parts = parse_url($p['url']);
+ if (($parts = parse_url($p['url'])) === false)
+ it::error('malformed url ' . $p['url']);
if ($p['safety'] == 1)
it::error(array('title'=>"get_cache: download failures on $path", 'ok_key'=>md5($parts['host']), 'ok_delay'=>$p['maxage'], 'ok'=>$result ? 1 : 0)); # send err only if multi failure
@unlink("$path.lock");