Skip to content

Commit

Permalink
[TASK] Make TextfieldViewHelperTest notice free
Browse files Browse the repository at this point in the history
Releases: master
Resolves: #84365
Change-Id: I09df5639ba60d7532dd5b8d7dddb1298086fe010
Reviewed-on: https://review.typo3.org/56242
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
janhelke authored and lolli42 committed Mar 16, 2018
1 parent 1264d81 commit a987175
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Expand Up @@ -118,17 +118,17 @@ protected function getNameWithoutPrefix()
'formObjectName'
);
if (!empty($formObjectName)) {
$propertySegments = explode('.', $this->arguments['property']);
$propertySegments = explode('.', $this->arguments['property'] ?? '');
$propertyPath = '';
foreach ($propertySegments as $segment) {
$propertyPath .= '[' . $segment . ']';
}
$name = $formObjectName . $propertyPath;
} else {
$name = $this->arguments['property'];
$name = $this->arguments['property'] ?? '';
}
} else {
$name = $this->arguments['name'];
$name = $this->arguments['name'] ?? '';
}
if ($this->hasArgument('value') && is_object($this->arguments['value'])) {
// @todo Use $this->persistenceManager->isNewObject() once it is implemented
Expand Down
Expand Up @@ -65,8 +65,8 @@ public function initializeArguments()
*/
public function render()
{
$required = $this->arguments['required'];
$type = $this->arguments['type'];
$required = $this->arguments['required'] ?? false;
$type = $this->arguments['type'] ?? null;

$name = $this->getName();
$this->registerFieldNameForFormTokenGeneration($name);
Expand Down
@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;

/*
Expand All @@ -23,11 +24,6 @@
*/
class TextfieldViewHelperTest extends ViewHelperBaseTestcase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;

/**
* @var TextfieldViewHelper
*/
Expand Down

0 comments on commit a987175

Please sign in to comment.