Here’s the line causing the error:
$image = wp_get_attachment_image_src( $attachment_id, array(100,100), true )[0];
Great catch! I have posted an update on the dev repo at https://github.com/codearachnid/gf-notification-attachment/blob/master/gf-notification-attachment.php – so you can take advantage of the new code. I have a few more planned enhancements before releasing the next .dot version.
i also get the syntax error.
Parse error: syntax error, unexpected ‘[‘ in /home/bekkum1/domains/mydomain.nl/public_html/wp-content/plugins/gravity-forms-notification-attachments/gf-notification-attachment.php on line 129
I also put the update on the dev repo, but that didn’t worked. Do you know an other solution ???
mathijsbok, it seems you’re having the same error as identified already. Please ensure that the code is updated on your server.
The code is updated on the server. Maybe you can paste the code to me or on thus topic ??
replace your line 129 with the following:
$image = wp_get_attachment_image_src( $attachment_id, array(100,100), true );
if( !empty( $image ) )
$image = $image[0];
I figured out that my code not OK was, he didn’t updated it in my server.
Now it works for me. Thankx a lot.
Great! Thank you for the followup.
A new version has been released that fixes the issues brought up by the support forum. Please let me know if there are still residual issues.