Details
-
Bug
-
Resolution: Fixed
-
High
-
5.4-dev
-
None
Description
At the Public API documentation, at the:
https://doc.ez.no/display/EZP/2.+Browsing%2C+finding%2C+viewing
at the subsection "Displaying values from a Content", on the code, at the part inside the "foreach":
(...)
$valueHash = $fieldType->toHash( $field->value );
(...)
I believe the $field->value part should be corrected to $field only, since the $field variable is already assigned a value variable type from the line above:
$field = $content->getFieldValue( $fieldDefinition->identifier );
Trying to fetch a value variable type parameter from what already seems to be a value variable type doesn't make sense to me.
Found out while trying to base my code for a controller on this.