Skip to content
Permalink
Browse files

Fix errors when reporting errors

Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information...
williamdes committed Jul 1, 2019
1 parent 6451c13 commit b42685c63ad758edcdce2fadea3ea9bd0dc26405
Showing with 6 additions and 6 deletions.
  1. +1 −1 error_report.php
  2. +1 −1 libraries/classes/ErrorReport.php
  3. +4 −4 libraries/classes/Utils/HttpRequest.php
@@ -55,7 +55,7 @@
// report if and only if there were 'actual' errors.
if (count($reportData) > 0) {
$server_response = $errorReport->send($reportData);
if ($server_response === false) {
if (! is_string($server_response)) {
$success = false;
} else {
$decoded_response = json_decode($server_response, true);
@@ -208,7 +208,7 @@ private function sanitizeUrl($url)
*
* @param array $report the report info to be sent
*
* @return string the reply of the server
* @return string|null|bool the reply of the server
*/
public function send(array $report)
{
@@ -63,7 +63,7 @@ private function handleContext(array $context)
* @param int $httpStatus HTTP response status code
* @param bool $returnOnlyStatus If set to true, the method would only return response status
*
* @return mixed
* @return string|null|bool
*/
private function response(
$response,
@@ -92,7 +92,7 @@ private function response(
* @param string $header Header to be set for the HTTP request
* @param int $ssl SSL mode to use
*
* @return mixed
* @return string|null|bool
*/
private function curl(
$url,
@@ -192,7 +192,7 @@ private function curl(
* @param mixed $content Content to be sent with HTTP request
* @param string $header Header to be set for the HTTP request
*
* @return mixed
* @return string|null|bool
*/
private function fopen(
$url,
@@ -239,7 +239,7 @@ private function fopen(
* @param mixed $content Content to be sent with HTTP request
* @param string $header Header to be set for the HTTP request
*
* @return mixed
* @return string|null|bool
*/
public function create(
$url,

0 comments on commit b42685c

Please sign in to comment.
You can’t perform that action at this time.