[BUGFIX] Fix incorrect call to substr_count 74/23374/3
authorMichiel Roos <michiel@maxserv.nl>
Tue, 27 Aug 2013 18:09:16 +0000 (20:09 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 27 Aug 2013 18:35:17 +0000 (20:35 +0200)
The call to substr_count was incorrect.

Change-Id: I9f452d22f03a99fbf0b862021b100dcf6d53d792
Resolves: #51409
Releases: 6.2
Reviewed-on: https://review.typo3.org/23374
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php

index 9798e5f..84c659a 100644 (file)
@@ -489,7 +489,7 @@ class DatabaseConnect extends Action\AbstractAction implements StepInterface {
        protected function getConfiguredHost() {
                $host = isset($GLOBALS['TYPO3_CONF_VARS']['DB']['host']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['host'] : '';
                $port = isset($GLOBALS['TYPO3_CONF_VARS']['DB']['port']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['port'] : '';
-               if (strlen($port) < 1 && substr_count($host, 0, ':') === 1) {
+               if (strlen($port) < 1 && substr_count($host, ':') === 1) {
                        list($host) = explode(':', $host);
                }
                return $host;
@@ -503,7 +503,7 @@ class DatabaseConnect extends Action\AbstractAction implements StepInterface {
        protected function getConfiguredPort() {
                $host = isset($GLOBALS['TYPO3_CONF_VARS']['DB']['host']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['host'] : '';
                $port = isset($GLOBALS['TYPO3_CONF_VARS']['DB']['port']) ? $GLOBALS['TYPO3_CONF_VARS']['DB']['port'] : '';
-               if (!strlen($port) > 0 && substr_count($host, 0, ':') === 1) {
+               if (!strlen($port) > 0 && substr_count($host, ':') === 1) {
                        $hostPortArray = explode(':', $host);
                        $port = $hostPortArray[1];
                }
@@ -546,4 +546,4 @@ class DatabaseConnect extends Action\AbstractAction implements StepInterface {
                }
        }
 }
-?>
\ No newline at end of file
+?>