Bug #85946
closedCaching of GeneralUtility::getIndpEnv() does not work for NULL
100%
Description
There is a cache that returns the result of GeneralUtility::getIndpEnv().
I was wondering why it didn't have effect for my check on GeneralUtility::getIndpEnv('HTTP_HOST') when being run on the command line.
Obviously, the HTTP_HOST var is not defined, therefore the result is always NULL.
The problem here is that the cache is checked using isset(), which returns FALSE if a variable is set but the value is NULL.
The solution is to check if there is a cached entry using array_key_exists().
Updated by Gerrit Code Review over 6 years ago
- Status changed from New to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58005
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58006
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58007
Updated by Gerrit Code Review about 6 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58005
Updated by Gerrit Code Review about 6 years ago
Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58006
Updated by Gerrit Code Review about 6 years ago
Patch set 3 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58006
Updated by Michael Stucki about 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b7d9f9d88bfef77422cd0d94d3f44639fa600f54.