[BUGFIX] Ensure PHP 5.2 compatibility in makeInstance 70/33470/4
authorHelmut Hummel <helmut.hummel@typo3.org>
Wed, 22 Oct 2014 10:38:11 +0000 (12:38 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Wed, 22 Oct 2014 17:00:40 +0000 (19:00 +0200)
The backport #53682 introduced a regression with PHP 5.2,
which still is officially supported by TYPO3 CMS 4.5

Adapt the code to be PHP 5.2 compatible

Resolves: #62391
Releases: 4.5
Change-Id: Ie9d6c3175d02424e0d2329cc07ff99e09cccc040
Reviewed-on: http://review.typo3.org/33470
Reviewed-by: Christian Hernmarck <ch_t3@hernmarck.ch>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
t3lib/class.t3lib_div.php

index a71a511..55966d6 100644 (file)
@@ -5429,7 +5429,8 @@ final class t3lib_div {
                }
 
                        // Create new instance and call constructor with parameters
-               $instance = self::instantiateClass($finalClassName, func_get_args());
+               $arguments = func_get_args();
+               $instance = self::instantiateClass($finalClassName, $arguments);
 
                        // Register new singleton instance
                if ($instance instanceof t3lib_Singleton) {