Skip to content

Commit 031f8b9

Browse files
Added a check only run recordPerformance when a response is available
1 parent d44183a commit 031f8b9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/GateKeeper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ private function setCookie($cookie)
288288
*/
289289
public function recordPerformance($httpCode=200)
290290
{
291-
if(property_exists($this->result, 'responseID')) {
291+
if(isset($this->result) && property_exists($this->result, 'responseID')) {
292292
$time = $this->timer->elapsed();
293293
$this->client->responses->put($this->result->responseID, array('code'=>$httpCode, 'time'=>$time));
294294
$this->debug('Page performance was recorded '.$time);

0 commit comments

Comments
 (0)