D6.9: Call-time pass-by-reference has been deprecated

SocialNicheGuru - February 3, 2009 - 16:33
Project:Audio recording field
Version:6.x-1.0-beta1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of drupal_write_record(). 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 /var/www/vhosts/mysite.com/httpdocs/drupal6/sites/all/modules/AudioRecordingField/AudioRecordingField.module on line 159

#1

otronix - June 1, 2009 - 07:47

Me too, same bug.

#2

pburk - June 1, 2009 - 16:26

The drupal_write_record() function has been defined to accept a reference. So we do not actually have to pass it by reference. That has been deprecated in new versions of PHP.

To fix this I am removing the & in the "AudioRecordingField.module" file. I changed this:

drupal_write_record('files', &$file, array('fid'));

to this:

drupal_write_record('files', $file, array('fid'));

More discussion in these links:

http://drupal.org/node/343185

http://us2.php.net/manual/en/language.references.pass.php

 
 

Drupal is a registered trademark of Dries Buytaert.