Compatibility with PHP 5.4

This commit is contained in:
Manuel Cillero 2017-07-26 20:31:02 +02:00
parent 43345195e4
commit 2c186c8bd5
2 changed files with 4 additions and 2 deletions

View file

@ -1294,7 +1294,8 @@ function content_field_edit_form_validate($form, &$form_state) {
elseif (!empty($form_values['default_value_widget'])) {
// Fields that handle their own multiple values may use an expected
// value as the top-level key, so just pop off the top element.
$key = array_shift(array_keys($form_values['default_value_widget']));
$keys = array_keys($form_values['default_value_widget']);
$key = array_shift($keys);
$default_value = $form_values['default_value_widget'][$key];
$is_code = FALSE;
form_set_value(array('#parents' => array('default_value_php')), '', $form_state);