PHP notice is showing when no tweets to display.

Notice: Undefined property: stdClass::$statuses in Drupal\twitter_api_search\Plugin\Block\TwitterApiSearch->build() (line 175 of modules\contrib\twitter_api_search\src\Plugin\Block\TwitterApiSearch.php).

In the code, the statuses property is looping to extract each data needed, but the statuses property is not set when no tweets fetched. The status should be checked to avoid php notice. Attaching a temporary fix here.

Comments

madelyncruz created an issue. See original summary.

madelyncruz’s picture

Issue summary: View changes
StatusFileSize
new595 bytes

r3n pi2’s picture

Status: Active » Fixed

Thank you! I've just applied the patch and published a new release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.