Commit abd10820 authored by Benni Mack's avatar Benni Mack Committed by Christian Kuhn
Browse files

[TASK] Use TYPO3_OS constant in Services registration

There is a comment that TYPO3_OS is not yet defined, which
is wrong as it is one of the first things available during bootstrap,
so the check can be used directly.

Resolves: #82343
Releases: master, 8.7
Change-Id: I01e0aa7a090bc068195b44474f645d09220f8b71
Reviewed-on: https://review.typo3.org/53953

Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 07727da3
......@@ -1015,10 +1015,9 @@ class ExtensionManagementUtility
// OS check
// Empty $os means 'not limited to one OS', therefore a check is not needed
if ($GLOBALS['T3_SERVICES'][$serviceType][$serviceKey]['available'] && $GLOBALS['T3_SERVICES'][$serviceType][$serviceKey]['os'] != '') {
// TYPO3_OS is not yet defined
$os_type = stripos(PHP_OS, 'win') !== false && !stripos(PHP_OS, 'darwin') !== false ? 'WIN' : 'UNIX';
$os_type = TYPO3_OS === 'WIN' ? 'WIN' : 'UNIX';
$os = GeneralUtility::trimExplode(',', strtoupper($GLOBALS['T3_SERVICES'][$serviceType][$serviceKey]['os']));
if (!in_array($os_type, $os)) {
if (!in_array($os_type, $os, true)) {
self::deactivateService($serviceType, $serviceKey);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment