Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/Util.class.php3
-rw-r--r--libraries/error_report.lib.php3
-rw-r--r--version_check.php16
3 files changed, 16 insertions, 6 deletions
diff --git a/libraries/Util.class.php b/libraries/Util.class.php
index 34f6b80d57..8eaf8a698e 100644
--- a/libraries/Util.class.php
+++ b/libraries/Util.class.php
@@ -4252,6 +4252,9 @@ class PMA_Util
);
} else if (function_exists('curl_init')) {
$curl_handle = curl_init($file);
+ if ($curl_hadle === false) {
+ return array();
+ }
$curl_handle = PMA_Util::configureCurl($curl_handle);
curl_setopt(
$curl_handle,
diff --git a/libraries/error_report.lib.php b/libraries/error_report.lib.php
index 7e028813c3..86f908b6f4 100644
--- a/libraries/error_report.lib.php
+++ b/libraries/error_report.lib.php
@@ -210,6 +210,9 @@ function PMA_sendErrorReport($report)
}
$curl_handle = curl_init(SUBMISSION_URL);
+ if ($curl_hadle === false) {
+ return null;
+ }
$curl_handle = PMA_Util::configureCurl($curl_handle);
curl_setopt($curl_handle, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('Expect:'));
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,
+ )
+ );
+}
?>