"Notice: Undefined index: href" after upgrade from 1.6 to 1.7

Created on 20 January 2023, over 1 year ago
Updated 31 January 2024, 5 months ago

Problem/Motivation

I noticed after upgrading from 8.x-1.6 to 8.x-1.7 that I was seeing the following in the dblog when using the dialog to upload a new file:

Notice: Undefined index: href in Drupal\editor_file\Form\EditorFileDialog->buildForm() (line 168 of /var/www/html/modules/contrib/editor_file/src/Form/EditorFileDialog.php) 

multiplied 3x for different internal URLs (but basically the same in each one)

Steps to reproduce

Use this module at 8.x-1.7 to upload a file. Check dblog.

Proposed resolution

I think the cause is that while #3293519: Drupal Coding Standard Issue As Per 'phpcs --standard=Drupal' β†’ recommended using the null coalescing operator instead of ternary operator to set #default_value, and the patch suggested there β†’ seemed to do that, the commit seemed to use the (shorthand) ternary operator instead.

Will attach a patch shortly ...

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States maxstarkenburg

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024