54558[BUGFIX] Fix some PHP Notices thrown when rendering page module
Commit message
Review
-
Code review CR +2
- Susi Moog +2
- Wouter Wolters +1
- Frans Saris +1
-
Verified V +2
- Susi Moog +2
- Frans Saris +1
- TYPO3com +1 CI
Issues 1
Files 13
- typo3/sysext/backend/Classes/Controller/PageLayoutController.php4+2 −2
- typo3/sysext/backend/Classes/Module/ModuleLoader.php4+8 −6
- typo3/sysext/backend/Classes/Template/ModuleTemplate.php+2 −2
- typo3/sysext/backend/Classes/Utility/BackendUtility.php1+24 −14
- typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php+1 −1
- typo3/sysext/core/Classes/Log/LogManager.php3+1 −1
- typo3/sysext/core/Classes/Session/Backend/DatabaseSessionBackend.php3+1 −1
- typo3/sysext/core/Classes/TypoScript/TemplateService.php+12 −5
- typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php1+8 −5
- typo3/sysext/core/Classes/Utility/GeneralUtility.php+1 −1
- typo3/sysext/extbase/Classes/Utility/ExtensionUtility.php4+1 −1
- typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php+1 −1
- typo3/sysext/t3editor/Configuration/TCA/Overrides/tt_content.php4+3 −3
Review log 2129
Show 34 earlier messages
-
Tymoteusz Motylewski uploaded patch set 1 11/04/17, 23:28
-
Tymoteusz Motylewski commented on patch set 1 11/04/17, 23:36
this patch together with https://review.typo3.org/54557 reduced the number of notices in page module rendering from 3500 to 400. It can be improved much more easily, if we agree how to handle hooks (whether to test isset + is_array, or just !empty -
TYPO3com voted on patch set 1 V -1 11/04/17, 23:37 Completed build in 09m 10s on Sun, 5 Nov, 12:37 AM Test Summary: 10 of 57109 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16082
-
Frans Saris commented on patch set 1 11/04/17, 23:44
PageLayoutController.php:990Why not just replace it with empty()?PageLayoutController.php:998same hereModuleLoader.php:177use !empty() here?
-
Tymoteusz Motylewski commented on patch set 1 11/04/17, 23:46
PageLayoutController.php:990ReplyI wanted to be non breaking in case somebody set disableAdvanced = 0 -
Tymoteusz Motylewski commented on patch set 1 11/05/17, 00:02
PageLayoutController.php:990Replyyou're right, empty should also work -
Tymoteusz Motylewski uploaded patch set 2 11/05/17, 18:32
-
TYPO3com voted on patch set 2 V -1 11/05/17, 18:41 Completed build in 08m 20s on Sun, 5 Nov, 07:41 PM Test Summary: 10 of 57109 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16097
-
Tymoteusz Motylewski uploaded patch set 3 11/05/17, 18:50
-
TYPO3com voted on patch set 3 V +1 11/05/17, 18:59 Completed build in 08m 58s on Sun, 5 Nov, 07:59 PM Test Summary: 56750 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16098
-
Frans Saris commented on patch set 3 11/05/17, 19:40
ModuleLoader.php:164use !empty() or add () around this as it changes behavior this way :)BackendUtility.php:1761add !empty() here to?PageLayoutView.php:1962should this be ?: as ?? only checks for null of not set.LogManager.php:182this changes behaviour. because if $configuration[$configurationKey] was false or '' this wouldn't result in a empty array anymoreDatabaseSessionBackend.php:54(bool)$configuration['has_anonymous'] ?? false;ExtensionManagementUtility.php:905same here. if value is false or '' then this gives different resultsExtensionUtility.php:62use empty() as isset(false) gives trueExtensionUtility.php:198same herett_content.php:6empty()tt_content.php:9emptytt_content.php:12empty -
Tymoteusz Motylewski commented on patch set 3 11/05/17, 22:16
ModuleLoader.php:164Reply&& has precedence over || so no need for () aroundPageLayoutView.php:1962Reply$row['_ORIG_uid'] is not always set -> this is why a notice is thrown. So ?: is not an option.LogManager.php:182ReplyI think it's ok, as neither false nor "" is a correct configuration. See https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Logging/Configuration/Index.htmlDatabaseSessionBackend.php:54Replyyour proposal would still throw a notice -
Frans Saris commented on patch set 3 11/06/17, 07:35
ModuleLoader.php:164Replyah, you are right. But using !empty() instead of isset() && ... would make this easier to read right? And would do the samePageLayoutView.php:1962Replytrue. But are you sure $row['_ORIG_uid'] can never be 0?LogManager.php:182ReplyokDatabaseSessionBackend.php:54Replyyou are right, should be: = (bool)($configuration['has_anonymous'] ?? false); -
Tymoteusz Motylewski commented on patch set 3 11/06/17, 07:54
ExtensionUtility.php:62ReplyI've used isset to avoid overriding the configuration on each call, but as this method is called with different settings each time, I can change it to empty.ExtensionUtility.php:198ReplyDonett_content.php:6Replycan do, but is looks a little bit odd if (empty) set empty :) -
Tymoteusz Motylewski uploaded patch set 4 11/06/17, 08:12
-
TYPO3com voted on patch set 4 V +1 11/06/17, 08:21 Completed build in 08m 56s on Mon, 6 Nov, 09:21 AM Test Summary: 56750 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16101
-
Tymoteusz Motylewski uploaded patch set 5 11/14/17, 14:24
-
TYPO3com voted on patch set 5 V +1 11/14/17, 14:33 Completed build in 09m 43s on Tue, 14 Nov, 03:33 PM Test Summary: 56768 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16335
-
Tymoteusz Motylewski uploaded patch set 6 11/14/17, 14:46
-
Tymoteusz Motylewski uploaded patch set 7 11/14/17, 14:46
-
Tymoteusz Motylewski uploaded patch set 8 11/14/17, 14:54
-
TYPO3com voted on patch set 6 V -1 11/14/17, 14:57 Completed build in 10m 55s on Tue, 14 Nov, 03:57 PM Test Summary: 2 of 57127 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16337
-
TYPO3com voted on patch set 7 V +1 11/14/17, 14:59 Completed build in 12m 04s on Tue, 14 Nov, 03:59 PM Test Summary: 56768 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16338
-
TYPO3com voted on patch set 8 V +1 11/14/17, 15:04 Completed build in 10m 13s on Tue, 14 Nov, 04:04 PM Test Summary: 56768 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16339
-
Frans Saris voted on patch set 8 CR +1 11/14/17, 17:33
-
Frans Saris voted on patch set 8 V +1 11/14/17, 17:34
-
Wouter Wolters voted on patch set 8 CR +1 11/14/17, 18:28
-
Susi Moog voted on patch set 8 CR +2 V +2 11/16/17, 07:28
-
Gerrit merged patch set 8 11/16/17, 07:28