Problem with conditional_fields
| Project: | Conditional Fields |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
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.

#1
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.
#2
#3
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
#4
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.
.
#5
php 5.2.6
By results of I shall write
#6
The patch all has corrected, thanks!
#7
#8
Committed, thanks!
#9
Automatically closed -- issue fixed for two weeks with no activity.