71435[BUGFIX] Fix undefined key when reverting redirects
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Andreas Kienast +2
- Oliver Klee +1
- Nikita Hovratov +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Andreas Kienast +2
- Nikita Hovratov +1
- core-ci +1 CI
Issues 1
Files 1
Review log 2225
-
Robert Kärner uploaded patch set 1 10/05/21, 07:29
-
Oli Bartsch commented on patch set 1 10/05/21, 07:35
-
core-ci voted on patch set 1 V +1 10/05/21, 07:46 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17601
-
Robert Kärner commented on patch set 1 10/05/21, 07:51
RecordHistory.php:173ReplyI agree that we should use language features instead of functions. I've also considered this, but opted out because we would have to write ```if (!($insertsDeletes[$field] ?? false)) {``` instead, and this looks uglier in my eyes and is a bit more complicated to understand at a first glance. What's your opinion on that? -
Robert Kärner uploaded patch set 2 10/05/21, 08:39
-
Robert Kärner commented on patch set 2 10/05/21, 08:40
RecordHistory.php:173ReplyLet's go for your suggestion, as it's more performant too. -
Benjamin Franzke commented on patch set 1 10/05/21, 08:41
RecordHistory.php:173ReplyNo: if (($insertsDeletes[$field] ?? null) === null) would be better -
Benjamin Franzke uploaded patch set 3 10/05/21, 08:45
-
Benjamin Franzke commented on patch set 3 10/05/21, 08:45
RecordHistory.php:173ReplyDone -
Robert Kärner voted on patch set 3 V +1 CR +1 10/05/21, 08:47
-
Benjamin Franzke commented on patch set 3 10/05/21, 08:48
RecordHistory.php:176We could also remove the IF and rather write: $insertsDeletes[$field] = ($insertsDeletes[$field] ?? 0) + ($value['action'] === 'insert' ? 1 : -1); -
core-ci voted on patch set 3 V +1 10/05/21, 09:00 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17604
-
Andreas Kienast commented on patch set 3 CR -1 10/05/21, 09:02
RecordHistory.php:173why not `!isset($insertsDeletes[$field])`? -
Robert Kärner commented on patch set 3 10/05/21, 09:27
RecordHistory.php:173ReplyThat would work, as we're only dealing with integers. The only falsey value is 0, and all array values of 0 are unset in previous loop passes. -
Nikita Hovratov commented on patch set 3 10/05/21, 09:43
RecordHistory.php:173ReplyIn my eyes either use empty($var) or !($var ?? false). This is 1:1 the same as before without the warning. -
Robert Kärner uploaded patch set 4 10/05/21, 09:46
-
Robert Kärner commented on patch set 4 10/05/21, 09:49
RecordHistory.php:173ReplyI just pushed a new patchset with Andreas' suggestion before reading Nikitas comment.RecordHistory.php:176Reply UnresolvedThis is shorter and would work, but I'm undecided. It kinda hides the intention. -
Nikita Hovratov commented on patch set 4 10/05/21, 09:58
RecordHistory.php:173ReplyUsing isset is not exactly the same as before, but more like the intended behaviour. So it's fine by me, too. -
Nikita Hovratov voted on patch set 4 V +1 CR +1 10/05/21, 09:58
-
core-ci voted on patch set 4 V +1 10/05/21, 10:02 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17605
-
Robert Kärner commented on patch set 4 10/05/21, 10:04
RecordHistory.php:173ReplyDone -
Oliver Klee voted on patch set 4 CR +1 10/05/21, 10:15
-
Andreas Kienast voted on patch set 4 V +2 CR +2 10/05/21, 10:23
-
Andreas Kienast merged patch set 5 10/05/21, 10:23
-
Benjamin Franzke voted on patch set 5 V +2 CR +2 10/05/21, 10:25
RecordHistory.php:173