Commit b0ef53e4 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[BUGFIX] PHP 8 warnings from installer

Some rather obvious sanitation around
TYPO3 installation procedure.

Resolves: #94443
Releases: master
Change-Id: Icb358cafbf6216d436358b7b45273f907deba721
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69670


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 8fde6812
......@@ -379,8 +379,8 @@ class InstallerController
'socket' => $this->getDatabaseConfiguredMysqliSocket(),
]
);
if ($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'][ConnectionPool::DEFAULT_CONNECTION_NAME]['driver'] === 'mysqli'
&& $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'][ConnectionPool::DEFAULT_CONNECTION_NAME]['host'] === 'localhost') {
if (($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'][ConnectionPool::DEFAULT_CONNECTION_NAME]['driver'] ?? '') === 'mysqli'
&& ($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'][ConnectionPool::DEFAULT_CONNECTION_NAME]['host'] ?? '') === 'localhost') {
$activeAvailableOption = 'mysqliSocketManualConfiguration';
}
}
......@@ -627,8 +627,8 @@ class InstallerController
public function checkDatabaseSelectAction(): ResponseInterface
{
$success = false;
if ((string)$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'][ConnectionPool::DEFAULT_CONNECTION_NAME]['dbname'] !== ''
|| (string)$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'][ConnectionPool::DEFAULT_CONNECTION_NAME]['path'] !== ''
if ((string)($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'][ConnectionPool::DEFAULT_CONNECTION_NAME]['dbname'] ?? '') !== ''
|| (string)($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'][ConnectionPool::DEFAULT_CONNECTION_NAME]['path'] ?? '') !== ''
) {
try {
$success = GeneralUtility::makeInstance(ConnectionPool::class)
......
......@@ -87,7 +87,7 @@ class Installer implements MiddlewareInterface
if ($session->isExpired()) {
$session->refreshSession();
}
$postValues = $request->getParsedBody()['install'];
$postValues = $request->getParsedBody()['install'] ?? [];
$sessionTokenOk = false;
if (empty($postValues)) {
// No post data is there, no token check necessary
......
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