Closed (fixed)
Project:
User Points
Version:
6.x-1.x-dev
Component:
Code: userpoints API
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Jan 2010 at 04:16 UTC
Updated:
3 Jan 2014 at 01:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mikejonesok commentedSame here. PHP issue?
Comment #2
kbahey commentedCan you please try the latest -dev and see if it has the same issue?
Comment #3
mikejonesok commentedI am not getting the problem anyone it seems. I did cleared the cache and it seemed to be error free. I keep you posted, but great module. Thanks
Comment #4
J-Chance commentedI am still getting the issue. Please advise. i cleared the cache as well.
Comment #5
kbahey commentedCheck your web server's error log and Drupal's watchdog. They may have a clue.
Comment #6
J-Chance commentedI found the answer here:
http://groups.drupal.org/node/15653
It was because i am using PHP 3. I needed to edit the userpoints.module file to remove all instances of "&$" before a variable and replace them with "$". Thanks anyway.
Comment #7
kbahey commentedYou should not be using PHP 3. Not even PHP 4 which is no longer supported. And that fix is not really a fix. It has side effects and the module may not work in some cases.
Comment #8
heine commentedI doubt you could run Drupal on PHP 3. You probably mean 5.3?
Comment #9
J-Chance commentedThat is exactly what i meant. Sorry. I meant 5.3. Do you have another suggestion if that is not a fix?
Comment #10
kbahey commentedThe &$X syntax is a "by reference" thing. This means that variables can be modified. If you remove the &, then variables will be passed by value, and therefore any modifications to them by that function will not be passed back. I don't have the time to look in the code and see if it really modifies anything. But that gives you a clue on what to look for.
Comment #11
sivaji_ganesh_jojodae commentedUpgrading to recent dev version didn't fix this issue for me.
replacing
function theme_userpoints_list_users($header, &$rows, &$tid, &$pager_limit) {withfunction theme_userpoints_list_users($header, $rows, $tid, $pager_limit) {in userpoints.module did wonders.Developers note:
In function
theme_userpoints_list_users()why do you want to pass arguments as reference when it is not making any modifications ? (correct me if i am wrong)I am sorry your IDE (or mine) is not configured to use 2 space indentation and trailing white space removal.
Adding better title. I can hardly use it with this bug so bumping to critical.
Comment #12
kbahey commentedAre you using PHP 5.3?
Comment #13
sivaji_ganesh_jojodae commentedyes.
Comment #14
avpadernoComment #15
berdirThe fix is correct, theme functions are not supposed by receive by reference arguments.
However, the patch contains ~1000 unrelated whitespace changes, which really should be handled in a separate patch. Can you do a simple reroll with just the theme function argument changes?
Comment #16
avpadernoIt doesn't seem the patch resolves the issue; as far as I can see, it just fixes some formatting issues, which are not the topic of this report.
Comment #17
berdirYou are of course right :)
Attaching a working patch. Simple enough and should be ready to be commited.
Comment #18
avpadernoIt's a nice patch.
Comment #19
wiifmWorks for me, can we get this patch in ASAP and roll a new DEV release ?
Comment #20
kbahey commentedFixed.
New dev release should be available around 12 hours from now.