Skip to content
Snippets Groups Projects
Commit 87f3d332 authored by Angie Byron's avatar Angie Byron
Browse files

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

parent db58f464
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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']) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment