From 42ab3d58e5bbb624ffe57732c153bf20ae6d6e09 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Sat, 28 Jan 2012 11:29:05 +0000 Subject: honor "safety" param in it_url::get_cache_contents --- it_url.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it_url.class') diff --git a/it_url.class b/it_url.class index cf7f45a..753164a 100644 --- a/it_url.class +++ b/it_url.class @@ -584,7 +584,7 @@ function get_cache($p = array()) */ function get_cache_contents($p) { - return ($fn = self::get_cache($p)) ? file_get_contents($fn) : it::error(array('title' => "failed getting " . $p['url'], 'body' => var_export($p, true))); + return ($fn = self::get_cache($p)) ? file_get_contents($fn) : ($p['safety'] === 0 ? null : it::error(array('title' => "failed getting " . $p['url'], 'body' => var_export($p, true)))); } /** -- cgit v1.2.3