[FOLLOWUP][TASK] PHP7 compliance - part 1 85/41385/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 15 Jul 2015 22:52:33 +0000 (00:52 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 15 Jul 2015 22:59:08 +0000 (00:59 +0200)
The fluid patch triggers funny effects at several
places, this part of the patch is reverted for now.

Change-Id: I8620116a89e48b855200fbc1e34b4c7a21052566
Resolves: #68194
Releases: master
Reviewed-on: http://review.typo3.org/41385
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfHasRoleViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/IfViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Security/IfHasRoleViewHelper.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php

index 8d68bbd..de01803 100644 (file)
@@ -65,11 +65,10 @@ abstract class AbstractConditionViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHel
        /**
         * renders <f:then> child if $condition is true, otherwise renders <f:else> child.
         *
-        * @param string $condition
         * @return string the rendered string
         * @api
         */
-       public function render($condition = '') {
+       public function render() {
                if (static::evaluateCondition($this->arguments)) {
                        return $this->renderThenChild();
                } else {
index d0abedf..4f3aefd 100644 (file)
@@ -70,8 +70,8 @@ class IfHasRoleViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractCondi
         * @return string the rendered string
         * @api
         */
-       public function render($role = '') {
-               return parent::render($role);
+       public function render($role) {
+               return parent::render();
        }
 
        /**
index 944ca83..2db8da4 100644 (file)
@@ -86,11 +86,11 @@ class IfViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionVie
        /**
         * renders <f:then> child if $condition is true, otherwise renders <f:else> child.
         *
-        * @param string $condition View helper condition
+        * @param bool $condition View helper condition
         * @return string the rendered string
         * @api
         */
-       public function render($condition = '') {
-               return parent::render($condition);
+       public function render($condition) {
+               return parent::render();
        }
 }
index fc1392f..818d963 100644 (file)
@@ -70,8 +70,8 @@ class IfHasRoleViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractCondi
         * @return string the rendered string
         * @api
         */
-       public function render($role = '') {
-               return parent::render($role);
+       public function render($role) {
+               return parent::render();
        }
 
        /**
index 4c7011a..c686bf3 100644 (file)
@@ -282,11 +282,10 @@ class DateViewHelperTest extends UnitTestCase {
        /**
         * @param string $locale
         */
-       protected function setLocale() {
-               $args = func_get_args();
-               setlocale(LC_CTYPE, $args[0]);
-               setlocale(LC_MONETARY, $args[0]);
-               setlocale(LC_TIME, $args[0]);
+       protected function setLocale($locale) {
+               setlocale(LC_CTYPE, $locale);
+               setlocale(LC_MONETARY, $locale);
+               setlocale(LC_TIME, $locale);
        }
 
 }