0
votes

I am a drupal newbie. Can anyone tell me what is the meaning of such warning.

warning: Parameter 1 to profile_load_profile() expected to be a reference, value given in /data/multiserv/users/395147/projects/730411/www/includes/module.inc on line 462.

The line on question contains :

** * Invoke a hook in a particular module.
* * @param $module
* The name of the module (without the .module extension).
* @param $hook
* The name of the hook to invoke.
* @param ...
* Arguments to pass to the hook implementation.
* @return
* The return value of the hook implementation.
*/

function module_invoke() { $args = func_get_args();
$module = $args[0];
$hook = $args[1];
unset($args[0], $args[1]);
$function = $module .'_'. $hook;
if (module_hook($module, $hook)) { // this is line number 462
return call_user_func_array($function, $args);
} }

and in file ../modules/profile/profile.module the function :

function profile_load_profile(&$user) {
$result = db_query('SELECT f.name, f.type, v.value FROM {profile_fields} f INNER JOIN {profile_values} v ON f.fid = v.fid WHERE uid = %d', $user->uid);
while ($field = db_fetch_object($result)) {
if (empty($user->{$field->name})) {
$user->{$field->name} = _profile_field_serialize($field->type) ? unserialize($field->value) : $field->value;
}
}
}

1
If you post the line in question and the first 10 lines before and after it, more people may be going to be able to help.Pekka

1 Answers

1
votes

This looks like a PHP 5.3 incompatibility issue, which should be fixed in the next minor release of Drupal 6:

http://drupal.org/node/360605