Problem with conditional_fields

deole - June 11, 2008 - 00:05
Project:Conditional Fields
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

threexk - June 11, 2008 - 16:25

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

threexk - June 11, 2008 - 21:14
Status:active» patch (code needs review)

#3

deole - June 15, 2008 - 02:01

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

threexk - June 16, 2008 - 21:14

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.

.

AttachmentSize
fix_required_display_2.patch1014 bytes

#5

deole - June 18, 2008 - 01:05

php 5.2.6

By results of I shall write

#6

deole - June 22, 2008 - 02:39

The patch all has corrected, thanks!

#7

threexk - June 22, 2008 - 02:50
Status:patch (code needs review)» patch (reviewed & tested by the community)

#8

peterpoe - June 27, 2008 - 11:37
Status:patch (reviewed & tested by the community)» fixed

Committed, thanks!

#9

Anonymous (not verified) - July 11, 2008 - 11:44
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.