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

tien.xuan.vo’s picture

merauluka’s picture

Issue summary: View changes

This 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?

liquidcms’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Assigned: wanneng » Unassigned
Category: Support request » Bug report

i 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')));

liquidcms’s picture

fixed by removing array_pop method of pulling fields from entity to use in computed field value

ram4nd’s picture

Status: Active » Closed (works as designed)

Seems like unrelated to this module. Rather PHP version or simply wrong usage of functions.