Commit 87f3d332 authored by webchick's avatar webchick
Browse files

#717572 by trevjs: Fixed items param in hook_field_validate() should not be passed by reference.

parent db58f464
......@@ -382,7 +382,7 @@ function hook_field_prepare_view($entity_type, $entities, $field, $instances, $l
* name).
* - message: The human readable message to be displayed.
function hook_field_validate($entity_type, $entity, $field, $instance, $langcode, &$items, &$errors) {
function hook_field_validate($entity_type, $entity, $field, $instance, $langcode, $items, &$errors) {
foreach ($items as $delta => $item) {
if (!empty($item['value'])) {
if (!empty($field['settings']['max_length']) && drupal_strlen($item['value']) > $field['settings']['max_length']) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment