71603[BUGFIX] Fix undefined array key warnings in GifBuilder
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- Nikita Hovratov +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- Nikita Hovratov +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 2
Review log 3641
Show 1316 earlier messages
-
Stefan Bürk uploaded patch set 1 10/12/21, 20:35
-
core-ci voted on patch set 1 V +1 10/12/21, 20:52 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17994
-
Benni Mack voted on patch set 1 CR +1 10/13/21, 08:17
-
Simon Schaufelberger commented on patch set 1 CR -1 10/13/21, 09:13
I was just preparing a fix myself and I'm sure there are a couple more places. let me check... -
Nikita Hovratov uploaded patch set 2 10/13/21, 09:13
-
Nikita Hovratov commented on patch set 2 10/13/21, 09:15
Reply
Hey, I just added a few more I found with functional tests. I'm sure there are still more. -
core-ci voted on patch set 2 V +1 10/13/21, 09:30 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18018
-
Stefan Bürk commented on patch set 2 10/13/21, 09:51
Reply
Thanks, but leaving GraphicalFunctions out was intended, as it is cross core extensions. Now it's in. Would prefer to have smaller patches which gets in instead of hanging around and extended over days. -
Nikita Hovratov commented on patch set 2 10/13/21, 09:55
Reply
Okay, let's make another patch for GraphicalFunctions then. Had to fix those too, to pave my way through GifBuilder. -
Christian Kuhn commented on patch set 2 V +1 CR +1 10/13/21, 09:56
let's keep the patch as is now. -
Christian Kuhn commented on patch set 2 10/13/21, 09:57
Reply
or is anyone working on a split right now? -
Nikita Hovratov uploaded patch set 3 10/13/21, 09:57
-
Nikita Hovratov commented on patch set 3 10/13/21, 09:58
Reply
Sorry, already amended. -
Christian Kuhn commented on patch set 3 10/13/21, 09:59
all good. thx! -
Christian Kuhn voted on patch set 3 V +1 CR +1 10/13/21, 10:00
-
core-ci voted on patch set 3 V +1 10/13/21, 10:20 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18020
-
Simon Schaufelberger commented on patch set 3 CR -1 10/13/21, 10:32
let me compare with my own findings because i have A LOT in GifBuilder already -
Simon Schaufelberger commented on patch set 3 10/13/21, 11:31
i found just 2 moreGifBuilder.php:218if (isset($maskInfo['processedFile']) && $maskInfo['processedFile'] instanceof ProcessedFile) {GifBuilder.php:256if ((int)$theKey && isset($this->setup[$theKey . '.'])) {GifBuilder.php:589breaks -
Simon Schaufelberger commented on patch set 3 10/13/21, 11:34
I have also written another test but it is incomplete so far which covers quite a bit of the code: ``` /** * @test */ public function buildImageInCommandLineContextWithGifBuilderTextMask(): void { $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml'); $this->setUpBackendUserFromFixture(1); copy( __DIR__ . '/../Fixtures/Images/kasper-skarhoj1.jpg', Environment::getPublicPath() . '/fileadmin/kasper-skarhoj1.jpg' ); $storageRepository = GeneralUtility::makeInstance(StorageRepository::class)->findByUid(1); $file = $storageRepository->getFile('kasper-skarhoj1.jpg'); $fileArray = [ 'XY' => '640,480', 'format' => 'jpg', '10' => 'IMAGE', '10.' => [ 'file' => $file, 'file.' => [ 'width' => 300, ], 'mask' => 'GIFBUILDER', 'mask.' => [ 'XY' => '[10.w]+40,80', 'backColor' => '#ffffff', '10' => 'TEXT', '10.' => [ 'text' => 'TYPO3 rulez !', 'fontColor' => '#000000', ], ], ], ]; $gifBuilder = new GifBuilder(); $gifBuilder->start($fileArray, []); $gifFileName = $gifBuilder->gifBuild(); self::assertFileExists(Environment::getPublicPath() . '/' . $gifFileName); } ``` -
Simon Schaufelberger commented on patch set 3 10/13/21, 11:38
The easiest is to put a breakpoint in TYPO3\CMS\Core\Error\ErrorHandler::handleError(), then you will catch a lot of errors. I also see some errors about `unlink` coming from GraphicalFunctions but I wonder why those files don't exist actually -
Nikita Hovratov uploaded patch set 4 10/13/21, 13:58
-
Nikita Hovratov commented on patch set 4 10/13/21, 13:59
GifBuilder.php:218ReplyDoneGifBuilder.php:256ReplyDoneGifBuilder.php:589ReplyDone -
Simon Schaufelberger voted on patch set 4 V +1 CR +1 10/13/21, 14:00
-
Simon Schaufelberger commented on patch set 4 V 0 CR -1 10/13/21, 14:01
I was not aware that you now also have GraphicalFunctions included.GraphicalFunctions.php:2703i guess this one is missing -
Simon Schaufelberger commented on patch set 4 10/13/21, 14:02
Reply
I thought we handle GraphicalFunctions in another patch? -
Stefan Bürk commented on patch set 4 10/13/21, 14:11
Reply
Original yes, but let them now as is at get it in. (To go on with wit follow patches).GraphicalFunctions.php:2703Replylet us do this too (if no one else i will do it after work). Nikita if you have time, would you add it ? Thanks anyway for your update, as I'm currently bound at work. -
core-ci voted on patch set 4 V +1 10/13/21, 14:12 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18047
-
Simon Schaufelberger commented on patch set 4 10/13/21, 14:19
GraphicalFunctions.php:2703ReplyWell, I have a bunch of fixes in GraphicalFunctions as well as this code is from the last century 😄 -
Nikita Hovratov uploaded patch set 5 10/13/21, 14:19
-
Nikita Hovratov commented on patch set 4 10/13/21, 14:20
GraphicalFunctions.php:2703ReplyDone -
Simon Schaufelberger commented on patch set 5 10/13/21, 14:21
What about the changes from patch set 2? There were lots more -
Simon Schaufelberger commented on patch set 5 10/13/21, 14:22
all or nothing 😄 -
Nikita Hovratov commented on patch set 5 10/13/21, 14:22
Reply
It is already merged in another patch. Thats the reason I added the additional ones here. -
core-ci voted on patch set 5 V +1 10/13/21, 14:32 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18049
-
Christian Kuhn commented on patch set 5 10/13/21, 14:46
Reply
we'll do that in a similar way with an upcoming testing-framework change. -
Christian Kuhn voted on patch set 5 V +1 CR +1 10/13/21, 14:48
-
Stefan Bürk voted on patch set 5 V +1 CR +1 10/13/21, 14:49
-
Nikita Hovratov voted on patch set 5 V +1 CR +1 10/13/21, 14:49
-
Simon Schaufelberger commented on patch set 5 V +1 CR +1 10/13/21, 14:50
Ok, if I find some more, I will add them later. Let me approve that for now -
Christian Kuhn voted on patch set 5 V +2 CR +2 10/13/21, 14:53
-
Christian Kuhn merged patch set 6 10/13/21, 14:53