71505[BUGFIX] Prevent undefined key warnings in ProductionExceptionHandler
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Oli Bartsch +1
- Oliver Klee +1
- Robert Kärner +1
-
Verified V +2 Done
- Benni Mack +2
- Oli Bartsch +1
- core-ci +1 CI
Issues 1
Files 2
Review log 2733
Show 68 earlier messages
-
Robert Kärner uploaded patch set 1 10/08/21, 09:32
-
core-ci voted on patch set 1 V +1 10/08/21, 09:52 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17807
-
Oliver Klee voted on patch set 1 CR +1 10/08/21, 10:06
-
Oli Bartsch commented on patch set 1 10/08/21, 13:37
AbstractExceptionHandler.php:197We might want to add the return type "?BackendUserAuthentication" here.ProductionExceptionHandler.php:110Since this class extends the AbstractExceptionHandler, we could also use the getter method here: if (($backendUser = $this->getBackendUser()) !== null) { return $backendUser->user['uid'] > 0; } -
Robert Kärner commented on patch set 1 10/08/21, 13:43
AbstractExceptionHandler.php:197ReplySounds good, I'll take care of that. -
Robert Kärner uploaded patch set 2 10/08/21, 13:50
-
Robert Kärner commented on patch set 2 10/08/21, 13:51
AbstractExceptionHandler.php:144ReplyDoneAbstractExceptionHandler.php:197ReplyDoneProductionExceptionHandler.php:110ReplyDone -
core-ci voted on patch set 2 V -1 10/08/21, 13:54 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17821
-
Oliver Klee commented on patch set 2 10/08/21, 13:55
ProductionExceptionHandler.php:110Please let's not have assigments in conditions (as this tends to confuse the reader). Shall I fix it? -
Oliver Klee commented on patch set 2 10/08/21, 14:01
(The build failure is about an unused import.) -
Oli Bartsch commented on patch set 2 10/08/21, 14:03
ProductionExceptionHandler.php:110ReplyYes, would be fine for me. -
Oliver Klee commented on patch set 2 CR -1 10/08/21, 14:05
Okay, on it. -
Robert Kärner commented on patch set 2 10/08/21, 14:06
Reply
Ahh, I forgot to check the imports. Good to know this is checked.ProductionExceptionHandler.php:110ReplyAlright, I went with Oliver Bartsch's suggestion there. I still have the project open, let me push a new patchset real quick. -
Robert Kärner commented on patch set 2 10/08/21, 14:06
Reply
Alright, your turn. ;) -
Oliver Klee uploaded patch set 3 10/08/21, 14:10
-
Oliver Klee commented on patch set 3 10/08/21, 14:11
ProductionExceptionHandler.php:110ReplyDone -
core-ci voted on patch set 3 V +1 10/08/21, 14:25 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17822
-
Robert Kärner voted on patch set 3 V +1 CR +1 10/08/21, 14:33
-
Oliver Klee voted on patch set 3 CR +1 10/08/21, 14:49
-
Oli Bartsch commented on patch set 3 10/08/21, 14:51
Will updateAbstractExceptionHandler.php:145$backendUser can only be null or BackendUserAuthentication. Therefore checking for "NULL" should be faster.AbstractExceptionHandler.php:149This is now a change in behaviour since workspace=0 is valid. Actually I meant to completely drop the if clause. -
Oli Bartsch uploaded patch set 4 10/08/21, 14:55
-
Oli Bartsch uploaded patch set 5 10/08/21, 14:57
-
Oliver Klee commented on patch set 5 10/08/21, 15:01
AbstractExceptionHandler.php:145ReplyI don't know whether this has any relevant performance impact. However, I think this better communicates the intent behind the code to the reader. Please let's leave as is. (I once read an article explaining this, but I don't have it bookmarked and cannot find it anymore.) -
Oliver Klee commented on patch set 5 10/08/21, 15:02
AbstractExceptionHandler.php:145ReplyOliver, would you be find with changing this back to use the instanceof? -
core-ci voted on patch set 4 V +1 10/08/21, 15:16 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17826
-
Oli Bartsch uploaded patch set 6 10/08/21, 15:16
-
Oli Bartsch commented on patch set 6 V +1 CR +1 10/08/21, 15:17
AbstractExceptionHandler.php:145ReplyDoneAbstractExceptionHandler.php:149ReplyDone -
core-ci voted on patch set 5 V +1 10/08/21, 15:17 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17827
-
Robert Kärner commented on patch set 6 CR +1 10/08/21, 15:20
AbstractExceptionHandler.php:145ReplyJust to give you some feedback: My personal preference would be !== null, as I see this more often and using it in my own projects, but I‘m fine with instanceof too. -
core-ci voted on patch set 6 V +1 10/08/21, 15:34 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17830
-
Oliver Klee voted on patch set 6 CR +1 10/08/21, 15:48
-
Benni Mack voted on patch set 6 V +2 CR +2 10/08/21, 16:41
-
Benni Mack merged patch set 7 10/08/21, 16:41
AbstractExceptionHandler.php:144