Real Name problem with php 5.3

digemall - November 7, 2009 - 18:28
Project:RealName
Version:6.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,
I'm running drupal 6.14 on the latest xampp (php 5.3, mysql 5.1.37) and I found a problem with realname (1.3).
To be sure I've done a clean installation where I installed only drupal and realname.
Realname is using a single text field in core profile module.

When I activate realname, I report this error:
warning: Parameter 1 to profile_load_profile() expected to be a reference, value given in C:\xampp\htdocs\prove\includes\module.inc on line 450

I'm completely newbie, but I think the problem is related to this one --> http://drupal.org/node/360605

In particular they speak about realname here --> http://drupal.org/node/360605#comment-1689842

The patch they talk about is already committed in core 6.14, but the realname problem seems not related to core (as stated in the post linked above) and so the patch doesn't fix it.

I reported this error thinking is a bug, but, as stated before, I'm newbie so delete this post with no problem ;)

Thx

#1

Sera - December 7, 2009 - 12:52

*deleting wrong "solution"*

Thx diggemall (see #2) for clarification.

#2

digemall - December 1, 2009 - 22:21

Changing the line

      module_invoke($module, 'load_profile', $account, $type);

to

      module_invoke($module, '_load_profile', $account, $type);

in realname.module, you skip the warning simply because the function that you call with module_invoke ( = profile__load_profile) doesn't exist.
So you don't get the warning but you don't obtain an overriden realname too (i've tested it).

The only change that really works, is removing the "&" from the line

function profile_load_profile(&$user) {

in core profile.module

I don't know how this could be fixed by realname module, probably it's not possible...
I really think it's a core problem but probably drupal 6 aims to be compatible with php4 so the & won't be removed...

#3

VM - December 1, 2009 - 22:37

Drupal 6.x core is aimed at PHP 4.3.5 to PHP 5.2.x

PHP 5.3 didn't exist when Drupal 6.x was released. PHP 5.3 deprecated a function or two which causes issue with core and contrib where this functions are used. Best bet is to roll back to PHP 5.2.x unless you have the skillset to patch core and contrib modules and hopefully contribute the patches back to the community.

for more info on the PHP and drupal requirements and reccomendations see: http://drupal.org/requirements

#4

digemall - December 2, 2009 - 18:40

Ok thx for the clarification VM ;)

 
 

Drupal is a registered trademark of Dries Buytaert.