[BUGFIX] Explicit require dbal autoloader file 40/20440/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 2 May 2013 18:07:24 +0000 (20:07 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 2 May 2013 18:11:28 +0000 (20:11 +0200)
The dbal autoload file in Installer.php may not be found if
ext:dbal is not loaded. This is solved with an explicit require.

Change-Id: I9991d579ec56c85dd117bc7938d129844b2d3150
Resolves: #47847
Related: #47836
Releases: 6.2
Reviewed-on: https://review.typo3.org/20440
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/install/Classes/Installer.php

index b54f759..58066a2 100644 (file)
@@ -290,9 +290,13 @@ class Installer {
                        $this->step = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('step'));
                }
 
-               // Let DBAL decide whether to load itself
-               $dbalAutoloader = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Dbal\\Autoloader');
-               $dbalAutoloader->execute($this);
+               // Let DBAL decide whether to load itself - manual require since ext:dbal is not always loaded
+               $dbalLoaderFile = $this->backPath . 'sysext/dbal/Classes/Autoloader.php';
+               if (@is_file($dbalLoaderFile)) {
+                       require_once $dbalLoaderFile;
+                       $dbalAutoloader = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Dbal\\Autoloader');
+                       $dbalAutoloader->execute($this);
+               }
 
                if ($this->mode === '123') {
                        // Check for mandatory PHP modules