Hi,
Warning message :

Strict warning: Only variables should be passed by reference in tournament_privatemsg_write_access() (line 99 of /var/www/drupal/sites/all/modules/contrib/tournament/modules/tournament_privatemsg/tournament_privatemsg.module).

Conditions:
-when viewing a node (like *BaseUrl*/node/9) and perhaps other pages ?
-For all user without the "Write private messages to all tournaments participants" permission.

i tried to google the error message and it seems few drupal sites have this bug but didn't find any report.
Also in Dev version.
Thanks for your help :)

Comments

LemonHardos’s picture

Issue summary: View changes

(oh please delete this comment, it seems i mixed forms...)

fenda’s picture

@Lemon006

Are you still experiencing this error? Could you explain in a little more detail how I can reproduce it?

lahoosascoots’s picture

Are you on PHP 5.5? It now throws a warning when you try to pass function return values to other functions that dereference variables like reset()

This around line 99 of tournament/modules/tournament_privatemsg/tournament_privatemsg.module

if (empty($recipient->title)) {
      $recipient = reset(tournament_privatemsg_load_multiple(array($nid)));
}

needs to be updated to be something like this:

if (empty($recipient->title)) {
      $tournaments = tournament_privatemsg_load_multiple(array($nid));
      $recipient = reset($tournaments);
}
lahoosascoots’s picture

Assigned: Unassigned » lahoosascoots
Status: Active » Needs review
StatusFileSize
new718 bytes

This should do it for you. Give it a shot and let me know how it goes for you.

fenda’s picture

@lahoosascoots

Thanks!! I've committed this to 7.x-1.x.

  • fenda committed 2c7e3c1 on 7.x-1.x
    Issue #2388647 by lahoosascoots: Strict warning: Only variables should...
fenda’s picture

Status: Needs review » Closed (fixed)