Project

General

Profile

Actions

Bug #66046

closed

ViewHelper SelectView does not

Added by Daniel Wagner over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2015-03-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Problem
TYPO3 6.2.11 together with powermail 2.2.0 produced following error with a simple select field in a form.
No identifying value for object of class "" found.

Analysis
As far as I understood the code of SelectViewHelper from fluid the $value should be added to $options if it is an object or an array.
If it is an object it has to be preprocessed. Actually above exception is thrown if it is an array instead of adding it to $options.

Suggestion

      protected function getOptions() {
                [ ... ]
                $optionsArgument = $this->arguments['options'];
                foreach ($optionsArgument as $key => $value) {
-                        if (is_object($value)) || is_array($value)) {
+                        if (is_object($value)) {
                                if ($this->hasArgument('optionValueField')) {
                                       [ ... ]
                                }
                                [ ... ]
-                        }
-                        $options[$key] = $value;
+                        if (is_object($value)) || is_array($value)) {
+                                $options[$key] = $value;
+                        }


Files

fluid_selectViewHelper.patch (982 Bytes) fluid_selectViewHelper.patch Daniel Wagner, 2015-03-26 16:02
Actions #2

Updated by Wouter Wolters over 9 years ago

  • Status changed from New to Closed

this has been fixed already and will be released in 6.2.12

Actions

Also available in: Atom PDF