Warning: urlencode() expects parameter 1 to be string, array given in Drupal\responsive_share_buttons\Plugin\Block\ResponsiveShareButtonsBlock->build() (line 29 of modules/contrib/responsive_share_buttons/src/Plugin/Block/ResponsiveShareButtonsBlock.php).

Comments

malcomio created an issue. See original summary.

guncha25’s picture

StatusFileSize
new942 bytes
malcomio’s picture

Status: Active » Needs review
StatusFileSize
new925 bytes

Thanks for the patch - it seems to fix the issue.

A couple of things though:

  1. The elseif should be on the next line: https://www.drupal.org/docs/develop/standards/coding-standards#controlst...
  2. Would be worth a comment to explain why this code is needed - i.e. why is $title sometimes an array, and sometimes not a string?

I've re-rolled the patch to cover the first point, but would be nice to get an answer to the second point.

  • malcomio authored 17f998b on 8.x-1.x
    Issue #2731547 by malcomio, guncha25: array passed to urlencode
    
malcomio’s picture

Status: Needs review » Fixed

I've committed the rerolled patch, but it would be nice to get more info in the comments if we can.

  • malcomio authored 01a3346 on 8.x-1.x
    Issue #2731547 by malcomio, guncha25: array passed to urlencode
    

Status: Fixed » Closed (fixed)

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