Automattic / crowdsignal-forms

Gutenberg blocks for Crowdsignal
GNU General Public License v2.0
13 stars 9 forks source link

crowdsignal applause block: Only try to fetch poll data if a pollId exists (php 8.1 warning) #270

Closed mreishus closed 8 months ago

mreishus commented 8 months ago

Fixes warnings like:

Warning: Undefined array key "pollId" in ...crowdsignal-forms/next/includes/frontend/blocks/class-crowdsignal-forms-applause-block.php on line 76

$attributes['pollId'] could be blank, so only run get_platform_poll_data() on it if it exists.

See testing directions on D135692-code. I started there but then realized that file probably belongs to an external repository.

mreishus commented 8 months ago

Great, thanks!

mreishus commented 8 months ago

deployed here: D135692-code