Undefined property notice: stdClass::$performanceMetrics

Created on 7 February 2015, about 10 years ago
Updated 20 October 2023, over 1 year ago

Problem/Motivation

After executing a search, the following notices are displayed on the search results page:

Notice: Undefined property: stdClass::$performanceMetrics in Funnelback\Response->__construct() (line 93 of C:\wamp\drupalbootstrap\drupal\sites\all\modules\funnelback\src\Funnelback\Response.php).
Notice: Trying to get property of non-object in Funnelback\Response->__construct() (line 93 of C:\wamp\drupalbootstrap\drupal\sites\all\modules\funnelback\src\Funnelback\Response.php).
Notice: Undefined property: stdClass::$performanceMetrics in Funnelback\Response->__construct() (line 93 of C:\wamp\drupalbootstrap\drupal\sites\all\modules\funnelback\src\Funnelback\Response.php).
Notice: Trying to get property of non-object in Funnelback\Response->__construct() (line 93 of C:\wamp\drupalbootstrap\drupal\sites\all\modules\funnelback\src\Funnelback\Response.php).

Proposed resolution

Test for the existence of $response->performanceMetrics->totalTimeMillis and set $this->totalTimeMillis to NULL if not available.

πŸ› Bug report
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom mattfarrow

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024