diff options
author | Simon Rettberg | 2017-03-21 12:18:47 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-03-21 12:18:47 +0100 |
commit | c415a9374872c6235fe822a5e038546522817e3a (patch) | |
tree | d04977a0cb1978195af5ce2ce083832de92e7178 /inc/property.inc.php | |
parent | [webinterface] Remember last HTTPS config; add redirect to HTTPS setting (diff) | |
download | slx-admin-c415a9374872c6235fe822a5e038546522817e3a.tar.gz slx-admin-c415a9374872c6235fe822a5e038546522817e3a.tar.xz slx-admin-c415a9374872c6235fe822a5e038546522817e3a.zip |
Fix a couple of warnings and notices from error.log
Diffstat (limited to 'inc/property.inc.php')
-rw-r--r-- | inc/property.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/property.inc.php b/inc/property.inc.php index b3d8081a..b33e1bff 100644 --- a/inc/property.inc.php +++ b/inc/property.inc.php @@ -146,19 +146,19 @@ class Property public static function getVersionCheckInformation() { - $data = json_decode(self::get('versioncheck-data'), true); - if (isset($data['time']) && $data['time'] + 120 > time()) + $data = json_decode(self::get('versioncheck-data', '[]'), true); + if (isset($data['time']) && $data['time'] + 60 > time()) return $data; $task = Taskmanager::submit('DownloadText', array( 'url' => CONFIG_REMOTE_ML . '/list.php' )); if (!isset($task['id'])) return 'Could not start list download (' . Message::asString() . ')'; - if ($task['statusCode'] !== TASK_FINISHED) { + if (!Taskmanager::isFinished($task)) { $task = Taskmanager::waitComplete($task['id'], 5000); } if ($task['statusCode'] !== TASK_FINISHED || !isset($task['data']['content'])) { - return $task['data']['error']; + return isset($task['data']['error']) ? $task['data']['error'] : 'Timeout'; } $data = json_decode($task['data']['content'], true); $data['time'] = time(); |