Issue Bug Closed

#98344Accessing array before checking the existence in class ShortcutAndMountPointRedirect

Marc Willmann 09/14/22, 07:18 updated 10/04/22, 08:54

Description

If you insert a page of type external link and do not maintain the mandatory field “url”, e.g. because the page is dragged and dropped into the page tree, this leads to an error message in the frontend when calling the page:

PHP Warning: Uninitialized string offset 0 in vendor/typo3/cms-frontend/Classes/Middleware/ShortcutAndMountPointRedirect.php line 108

The reason is that in said line the array is accessed without checking if it exists at all.

I will later this day provide a patch for this issue.

Reviews 2