diff --git a/ChangeLog b/ChangeLog index 56c1918d58..0f30650c83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -66,6 +66,8 @@ phpMyAdmin - ChangeLog - issue #11677 sql-parser and php-gettext collide. - issue #11920 Can't disable backquotes in export - issue #11911 Inserts via tbl_change.php in VARBINARY columns does not allow using HEX() and MD5() +- issue #11939 Correct content type for uploaded error reports +- issue #11940 Silent errors from checking local documentation 4.5.4.1 (2016-01-29) - issue #11892 Error with PMA 4.4.15.3 diff --git a/libraries/Util.php b/libraries/Util.php index dce554081f..53bca2b2c4 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -539,7 +539,7 @@ class Util if (defined('TESTSUITE')) { /* Provide consistent URL for testsuite */ return PMA_linkURL('http://docs.phpmyadmin.net/en/latest/' . $url); - } elseif (file_exists('doc/html/index.html')) { + } elseif (@file_exists('doc/html/index.html')) { if (defined('PMA_SETUP')) { return '../doc/html/' . $url; } else { diff --git a/libraries/error_report.lib.php b/libraries/error_report.lib.php index a7184b05bd..1d7741e816 100644 --- a/libraries/error_report.lib.php +++ b/libraries/error_report.lib.php @@ -183,7 +183,7 @@ function PMA_sendErrorReport($report) array( 'method' => 'POST', 'content' => $data_string, - 'header' => "Content-Type: multipart/form-data\r\n", + 'header' => "Content-Type: application/json\r\n", ) ); $context = PMA\libraries\Util::handleContext($context); @@ -205,7 +205,10 @@ function PMA_sendErrorReport($report) } $curl_handle = PMA\libraries\Util::configureCurl($curl_handle); curl_setopt($curl_handle, CURLOPT_CUSTOMREQUEST, "POST"); - curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('Expect:')); + curl_setopt( + $curl_handle, CURLOPT_HTTPHEADER, + array('Expect:', 'Content-Type: application/json') + ); curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data_string); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($curl_handle);