71944[BUGFIX] Fix PHP warnings in ext:lowlevel DB Check
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Oliver Klee +1
- Stefan Bürk +1
-
Verified V +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 1
Review log 2430
Show 45 earlier messages
-
Guido Schmechel uploaded patch set 1 10/23/21, 13:29
-
Guido Schmechel commented on patch set 1 10/23/21, 13:32
QueryGenerator.php:1729Here I am unsure if this is the right fallback. Feedback welcome :-) -
Guido Schmechel uploaded patch set 2 10/23/21, 13:34
-
Guido Schmechel commented on patch set 1 10/23/21, 13:34
QueryGenerator.php:381ReplyDone -
core-ci voted on patch set 1 V +1 10/23/21, 13:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18440
-
core-ci voted on patch set 2 V +1 10/23/21, 13:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18441
-
Stefan Bürk commented on patch set 2 CR -1 10/23/21, 14:44
QueryGenerator.php:1463No need to introduce a local spaced variable here, as not used further anyway. Maybe simplify this with: ``` if (count($this->fields[$fieldName]['items'] ?? []) <= 1) { ```QueryGenerator.php:1729ReplyThe empty $fieldType check here is okay. For the $conf['comparision'] I would go with a `?? 0` fallback instead of an isset check, as the isset would eventually not execute if fieldtype is test but comparision is "ommited". In generall here are some bit shiftings done to tranlsate beetween integer indexex and some values. See this for a visualization: https://3v4l.org/89BZ9QueryGenerator.php:1988Reuse '$allowedFields' hereQueryGenerator.php:2057Weired substitution here - Using false as fallback will evaluate the first part of the condition as false, and as such not going into the if-then block. Orignal and second part of condition applies to go into it if condition is false. That's impossible and will never go into it again. Maybe use following as substitution ? ``` if (!($this->tableArray[$from_table] ?? false)) { ``` -
Stefan Bürk commented on patch set 2 10/23/21, 14:45
Little bit more description/context here ? -
Guido Schmechel uploaded patch set 3 10/23/21, 15:01
-
Guido Schmechel commented on patch set 3 10/23/21, 15:05
Thanks for your feedback. I have adopted your changes :-)QueryGenerator.php:1463ReplyDoneQueryGenerator.php:1729ReplyDoneQueryGenerator.php:1988ReplyDoneQueryGenerator.php:2057ReplyDone -
core-ci voted on patch set 3 V +1 10/23/21, 15:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18444
-
Guido Schmechel commented on patch set 3 10/23/21, 15:27
Reply
Done -
Stefan Bürk commented on patch set 3 CR -1 10/24/21, 12:12
On itQueryGenerator.php:1727Rethought about this, and did not regonized it the first time. This would behave differently than before. Not sure if it is okay to change the behaviour here.QueryGenerator.php:1728verifyComparision says 'string' as type. But the code and everything does integer operations on it. Old shenanigans.QueryGenerator.php:1757no fallback for this ?QueryGenerator.php:1764Is this not the same code as in ~1725 ? Do we not have to do here the same ? -
Guido Schmechel commented on patch set 3 10/24/21, 12:20
QueryGenerator.php:1757ReplyDidn't notice anything negative when testing in the backend. The whole class has many more hits in this area. We could, of course, make a local variable out of it, as there are directly 3 hits only in the Diff.QueryGenerator.php:1764ReplyCorrect. See comment above -
Stefan Bürk uploaded patch set 4 10/24/21, 12:35
-
Stefan Bürk commented on patch set 4 CR +1 10/24/21, 12:36
QueryGenerator.php:1727ReplyDoneQueryGenerator.php:1728ReplyDoneQueryGenerator.php:1757ReplyDoneQueryGenerator.php:1764ReplyDone -
core-ci voted on patch set 4 V +1 10/24/21, 12:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18496
-
Jochen Roth voted on patch set 4 V +1 CR +1 10/25/21, 08:09
-
Oliver Klee voted on patch set 4 CR +1 10/25/21, 10:15
-
Nikita Hovratov uploaded patch set 5 10/26/21, 17:21
-
Nikita Hovratov commented on patch set 5 10/26/21, 17:23
Found some more places while testing. -
core-ci voted on patch set 5 V +1 10/26/21, 17:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18577
-
Oliver Klee voted on patch set 5 CR +1 10/26/21, 20:58
-
Christian Kuhn uploaded patch set 6 10/26/21, 21:08
-
Christian Kuhn commented on patch set 6 V +1 CR +1 10/26/21, 21:09
the entire module should be reconsidered and rewritten: there was a reason i moved that class to ext:lowlevel and out of ext:core in v11 ;) -
Stefan Bürk voted on patch set 6 V +1 CR +1 10/26/21, 21:10
-
Oliver Klee voted on patch set 6 CR +1 10/26/21, 21:16
-
core-ci voted on patch set 6 V +1 10/26/21, 21:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18600
-
Christian Kuhn voted on patch set 6 V +2 CR +2 10/26/21, 21:31
-
Christian Kuhn merged patch set 7 10/26/21, 21:31
QueryGenerator.php:381