diff options
author | Michal Čihař <michal@cihar.com> | 2014-12-05 12:20:13 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2014-12-05 12:20:13 +0300 |
commit | 61fcf215e5273eda769fcfca3eb47c259acd449b (patch) | |
tree | 6085caee78b2ab0c9f75fefa54bb07b6f3303c56 /version_check.php | |
parent | 974295ac854365d369bfabdd99e09a3cc4d2267a (diff) |
Detect failure of curl_init
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'version_check.php')
-rw-r--r-- | version_check.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/version_check.php b/version_check.php index fda43ad2f0..90e027c9fb 100644 --- a/version_check.php +++ b/version_check.php @@ -16,11 +16,15 @@ header('Content-type: application/json; charset=UTF-8'); $version = PMA_Util::getLatestVersion(); -echo json_encode( - array( - 'version' => $version->version, - 'date' => $version->date, - ) -); +if (empty($version_data)) { + echo json_encode(array()); +} else { + echo json_encode( + array( + 'version' => $version->version, + 'date' => $version->date, + ) + ); +} ?> |