Fatal error when only one content type available on /node/add-microcontent

Created on 12 July 2023, over 1 year ago

Problem

There is a fatal error when only one type of content is available for the current user.

Steps to reproduce

Reduce the set of available content types to one.
Go to /node/add-microcontent
See the error:
Error: Cannot use object of type Symfony\Component\HttpFoundation\RedirectResponse as array in Drupal\micronode\Controller\MicronodeController->addMicrocontentPage() (line 37 of modules/contrib/micronode/src/Controller/MicronodeController.php

Proposed resolution

Check the response is an array before accessing it

Remaining tasks

Code

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇪🇸Spain rodrigoaguilera Barcelona

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

Comments & Activities

Production build 0.71.5 2024