Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Ich have a "dependees" field (type select) with value custom/non-custom. If the user select non-custom, the new" dependent" text-fields "lastname" and "firstname" must be display and filled. It is OK.
But when user save the node, he got following:
Strict warning: Only variables should be passed by reference in eval()........sites\all\modules\computed_field\computed_field.module(466) : eval()'d code).
That means, that text-field cannot be used as dependent-field. Is it correct?
Comments
Comment #1
tien.xuan.vo CreditAttribution: tien.xuan.vo commented@see https://drupal.org/node/1896130
Comment #2
merauluka CreditAttribution: merauluka commentedThis did not fix the issue. Even after applying the change from the link in #1 and clearing my caches I am getting this error.
Strict warning: Only variables should be passed by reference in eval() (line 1 of .../all/modules/computed_field/computed_field.module(394) : eval()'d code).
The line in question appears to be
eval($settings['code']);
I am on PHP 5.3 and Drupal 7.26.
Does anyone have any other ideas?
Comment #3
liquidcms CreditAttribution: liquidcms commentedi get the same error with this line in my computed value:
$name = array_pop(array_pop(field_get_items($entity_type, $entity, 'field_guest_name')));
Comment #4
liquidcms CreditAttribution: liquidcms commentedfixed by removing array_pop method of pulling fields from entity to use in computed field value
Comment #5
ram4nd CreditAttribution: ram4nd as a volunteer commentedSeems like unrelated to this module. Rather PHP version or simply wrong usage of functions.