Fatal errors during preview

Created on 20 June 2023, almost 2 years ago

Problem/Motivation

While attempting to use the preview capability, I ran into a couple of fatal errors:
TypeError: implode(): Argument #1 ($pieces) must be of type array, string given in implode() (line 286 of /var/www/html/web/modules/custom/easy_email/easy_email.module).

And...
TypeError: Drupal\Core\File\FileUrlGenerator::generateAbsoluteString(): Argument #1 ($uri) must be of type string, null given, called in /var/www/html/web/modules/custom/easy_email/easy_email.module on line 308 in Drupal\Core\File\FileUrlGenerator->generateAbsoluteString() (line 65 of /var/www/html/web/core/lib/Drupal/Core/File/FileUrlGenerator.php).

I probably was giving it bad input, but the code should be able to handle these cases more gracefully.

Proposed resolution

Add checks that will prevent fatal errors if the input isn't what the code expects.

🐛 Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

🇨🇦Canada mandclu

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

Comments & Activities

Production build 0.71.5 2024