Fixed bug #17360: beforeWrap/afterWrap properties of TMENUITEM not working anymore
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / tslib / class.tslib_menu.php
index d57ba48..b9a6b98 100644 (file)
@@ -1927,10 +1927,14 @@ class tslib_tmenu extends tslib_menu {
                                $res=$this->I['A1'].$res.$this->I['A2'];
                        }
                }
-               $pref = isset($this->I['val'][$pref.'.'])
-                       ? $this->WMcObj->stdWrap($this->I['val'][$pref], $this->I['val'][$pref.'.'])
+               $processedPref = isset($this->I['val'][$pref . '.'])
+                       ? $this->WMcObj->stdWrap($this->I['val'][$pref], $this->I['val'][$pref . '.'])
                        : $this->I['val'][$pref];
-               return $this->tmpl->wrap($res.$pref, $this->I['val'][$pref.'Wrap']);
+               if (isset($this->I['val'][$pref . 'Wrap'])) {
+                       return $this->tmpl->wrap($res . $processedPref, $this->I['val'][$pref . 'Wrap']);
+               } else {
+                        return $res . $processedPref;
+               }
        }
 
        /**