Skip to content

Commit

Permalink
Merge pull request #890 from tim-moody/release-6.2-fixes4
Browse files Browse the repository at this point in the history
appending response time to error responses breaks json
  • Loading branch information
tim-moody authored Mar 13, 2017
2 parents 7a64bd3 + b03388f commit 80fc2ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roles/xsce-admin/templates/console/cmd-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
$time_end = microtime(true);
$time = $time_end - $time_start;

$reply = $reply . ',"Resp_time": "' . $time . '"}';
if( strpos( $reply, "Error" ) == false ) {
$reply = $reply . ',"Resp_time": "' . $time . '"}';
}

// $time = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"]; php 5.4 up

Expand Down

0 comments on commit 80fc2ff

Please sign in to comment.