Follow-up to #16591: Make getClassName() non recursive (Thanks to Pierre Dudoret)
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 11 Feb 2011 21:59:56 +0000 (21:59 +0000)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 11 Feb 2011 21:59:56 +0000 (21:59 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-5@10437 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index c8cfff9..df88b13 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-02-11  Christian Kuhn  <lolli@schwarzbu.ch>
+
+       * Follow-up to #16591: Make getClassName() non recursive (Thanks to Pierre Dudoret)
+
 2011-02-10  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Follow-up to #12230: Add unit test to test tslib_cObj::crop() for multibyte compatibility
index b64e552..c25d124 100644 (file)
@@ -5308,7 +5308,13 @@ final class t3lib_div {
         * @return      string          Final class name to instantiate with "new [classname]"
         */
        protected function getClassName($className) {
-               return (class_exists($className) && class_exists('ux_' . $className, FALSE) ? self::getClassName('ux_' . $className) : $className);
+               if (class_exists($className)) {
+                       while (class_exists('ux_' . $className, FALSE)) {
+                               $className = 'ux_' . $className;
+                       }
+               }
+
+               return $className;
        }
 
        /**