[BUGFIX] Fix Non-static method tslib_cObj::calc() 54/16754/5
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 26 Nov 2012 20:40:56 +0000 (21:40 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Fri, 12 Apr 2013 19:47:44 +0000 (21:47 +0200)
Non-static method tslib_cObj::calc() should
not be called statically

Change-Id: I9d6b5ac1c4e97164af8a3ce0eaaa0fe95c4a6860
Resolves: #38600
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/16754
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Stefan Neufeind
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/GraphicalMenuContentObject.php

index c8b67a5..2ef0822 100644 (file)
@@ -4374,7 +4374,7 @@ class ContentObjectRenderer {
        public function calcIntExplode($delim, $string) {
                $temp = explode($delim, $string);
                foreach ($temp as $key => $val) {
-                       $temp[$key] = intval(self::calc($val));
+                       $temp[$key] = intval($this->calc($val));
                }
                return $temp;
        }
index dbe4b1f..da3aeb5 100644 (file)
@@ -537,7 +537,7 @@ class AbstractMenuContentObject {
                                        }
                                        // Max number of items
                                        $limit = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->conf['special.']['limit'], 0, 100);
-                                       $maxAge = intval(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::calc($this->conf['special.']['maxAge']));
+                                       $maxAge = intval($this->parent_cObj->calc($this->conf['special.']['maxAge']));
                                        if (!$limit) {
                                                $limit = 10;
                                        }
@@ -836,7 +836,7 @@ class AbstractMenuContentObject {
                        $c_b = 0;
                        $minItems = intval($this->mconf['minItems'] ? $this->mconf['minItems'] : $this->conf['minItems']);
                        $maxItems = intval($this->mconf['maxItems'] ? $this->mconf['maxItems'] : $this->conf['maxItems']);
-                       $begin = \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::calc($this->mconf['begin'] ? $this->mconf['begin'] : $this->conf['begin']);
+                       $begin = $this->parent_cObj->calc($this->mconf['begin'] ? $this->mconf['begin'] : $this->conf['begin']);
                        $minItemsConf = isset($this->mconf['minItems.']) ? $this->mconf['minItems.'] : (isset($this->conf['minItems.']) ? $this->conf['minItems.'] : NULL);
                        $minItems = is_array($minItemsConf) ? $this->parent_cObj->stdWrap($minItems, $minItemsConf) : $minItems;
                        $maxItemsConf = isset($this->mconf['maxItems.']) ? $this->mconf['maxItems.'] : (isset($this->conf['maxItems.']) ? $this->conf['maxItems.'] : NULL);
index 9bfb1cc..79254d5 100644 (file)
@@ -107,11 +107,11 @@ class GraphicalMenuContentObject extends \TYPO3\CMS\Frontend\ContentObject\Menu\
                        }
                        $minDim = $this->mconf['min'];
                        if ($minDim) {
-                               $minDim = \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::calcIntExplode(',', $minDim . ',');
+                               $minDim = $this->parent_cObj->calcIntExplode(',', $minDim . ',');
                        }
                        $maxDim = $this->mconf['max'];
                        if ($maxDim) {
-                               $maxDim = \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::calcIntExplode(',', $maxDim . ',');
+                               $maxDim = $this->parent_cObj->calcIntExplode(',', $maxDim . ',');
                        }
                        if ($minDim) {
                                $conf[$items] = $conf[$items - 1];