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

@ -546,7 +546,8 @@ function content_field_instance_delete($field_name, $type_name, $rebuild = TRUE)
include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
// Get the previous field value.
$field = array_pop(content_field_instance_read(array('field_name' => $field_name, 'type_name' => $type_name)));
$fields = content_field_instance_read(array('field_name' => $field_name, 'type_name' => $type_name));
$field = array_pop($fields);
// Invoke hook_content_fieldapi().
module_invoke_all('content_fieldapi', 'delete instance', $field);