Project

General

Profile

Actions

Bug #105565

closed

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

Added by Lina Wolf 7 months ago. Updated 5 months ago.

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

100%

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

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #105897: Usage of Exception getPrevious() in DataHandler may throw excpeptionResolved2025-01-07

Actions
Related to TYPO3 Core - Task #105919: Evaluate all Doctrine DBAL ExceptionsClosed2025-01-13

Actions
Actions #1

Updated by Lina Wolf 7 months ago

The following patch gave me a helpful error message prventing a type error

Actions #2

Updated by Gerrit Code Review 7 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86958

Actions #3

Updated by Garvin Hicking 5 months ago

  • Related to Bug #105897: Usage of Exception getPrevious() in DataHandler may throw excpeption added
Actions #4

Updated by Benni Mack 5 months ago

  • Related to Task #105919: Evaluate all Doctrine DBAL Exceptions added
Actions #5

Updated by Gerrit Code Review 5 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86958

Actions #6

Updated by Gerrit Code Review 5 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86958

Actions #7

Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87958

Actions #8

Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87959

Actions #9

Updated by Oliver Bartsch 5 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF