CRON says

PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of conditional_fields_set_required_for_render(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /u/c20/ххх/htdocs/sites/all/modules/conditional_fields/conditional_fields.module on line 893

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of conditional_fields_set_required_for_render(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /u/c20/ххх/htdocs/sites/all/modules/conditional_fields/conditional_fields.module on line 893

Help to correct a problem and Explain on what it influences.

CommentFileSizeAuthor
#4 fix_required_display_2.patch1014 bytesthreexk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

threexk’s picture

Attached is a patch that should fix the problem. It is just a call-by-reference where I improperly used the '&'; the module should probably still work fine with this warning. It was introduced by my recent patch to fix the placement of the required-field indication (asterisk).

Could you please tell me
1. Whether the patch works
2. Which PHP version you are using
3. Where you see this warning

I could not replicate this problem on my end. Maybe my PHP version is too old.

threexk’s picture

Status: Active » Needs review
deole’s picture

1 Patch did not put
2 version PHP 5
3 This warning appears after start CRON comes on email

The support service of a hosting writes the following "In the beginning of a script put a command ini_set ("call_time_pass_reference", "1"); or esteem about this on the Internet."

Has made changes in conditional_fields.module

else if ($id = $item['#controlled_field']) {
ini_set("call_time_pass_reference","1"); - added
conditional_fields_set_required_for_render(&$item);
if ($item['#type'] == 'markup') {
/* Avoid unnecessary divs in multiple fields */
$item['#prefix'] = '

';
$item['#suffix'] = '

';
$output = drupal_render($item);
}
else {
$output = '

'. drupal_render($item) .'

';
}
}

Nothing has changed. Can it is not correct has changed a code

threexk’s picture

FileSize
1014 bytes

Sorry, here's the patch -- looks like I didn't actually post it before. Can you tell me if it works?

Which specific version of PHP 5 are you using? I have 5.2.3, and do not see this problem.

Thanks for your help with this bug.

.

deole’s picture

php 5.2.6

By results of I shall write

deole’s picture

The patch all has corrected, thanks!

threexk’s picture

Status: Needs review » Reviewed & tested by the community
peterpoe’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.