Project

General

Profile

Actions

Bug #105565

open

Call to a member function getMessage() on null in Typo3DbBackend.php

Added by Lina Wolf 10 days ago. Updated 10 days ago.

Status:
Under Review
Priority:
Should have
Assignee:
Category:
Extbase
Target version:
-
Start date:
2024-11-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When a table does not exist because I forgot to create it, I get the following error in a form finisher:

Call to a member function getMessage() on null

in /var/www/html/vendor/typo3/cms-extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php line 90

In this line $e->getPrevious(), which is nullable is expected to always exist.

I was able to get a helpful error message by changing the line to

throw new SqlErrorException($e->getPrevious()?->getMessage()??$e->getMessage(), 1470230766, $e);

Files

Bug105565.patch (922 Bytes) Bug105565.patch Lina Wolf, 2024-11-11 07:05
Actions

Also available in: Atom PDF