diff options
-rw-r--r-- | it_url.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class index d9e4869..a94975d 100644 --- a/it_url.class +++ b/it_url.class @@ -616,7 +616,7 @@ static function get_cache($p = array()) EDC('getcache', "new", $filemtime, $p['url'], $path); $url = new it_url; $data = $url->_get($p + ['checkonly' => true, 'filemtime' => EDC('nocache') ? null : $filemtime]); - if ($p['assoc'] ? ($data['status'] == 304 || $data['data']) : $data) + if ($p['assoc'] ? ($data['status'] < 500 || $data['data']) : $data) { $success = true; $isnewfile = it_url::_atomicwrite($path, $p['assoc'] ? ($data['status'] === 304 ? true : it::json_encode($data)) : $data); # $data === true means not modified (no new data fetched) and instructs _atomicwrite to just touch the file |