Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Upgrading to php-5.3 renders tac_lite (thus the whole site) unusable with barking like these:
warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /path/to/drupal/includes/module.inc on line 471.
Removing the ampersands from tac_lite_node_grants()
's definition renders tac_lite (thus the site) usable again - which is what the attached patch does.
Comment | File | Size | Author |
---|---|---|---|
#7 | tac_lite-patch-v2.patch | 1015 bytes | Pete Harlan |
tac_lite-php-5.3.patch | 457 bytes | Boobaa |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI can confirm that I also was getting the above errors and users could not access pages with tac_lite applied by role. Above patch worked. I was however using 1.x-1.2
Comment #2
markj CreditAttribution: markj commented6.x-1.3 also gives the error reported above, and the patch fixes it.
Comment #3
BerdirI haven't tested the patch, but the change looks OK.
Comment #4
james.cartledge CreditAttribution: james.cartledge commentedI can confirm this. I found it independently and came here to post the patch.
Comment #5
Andrew Schulman CreditAttribution: Andrew Schulman commentedsubscribing
Comment #6
ducdebreme CreditAttribution: ducdebreme commentedI have tested the patch successfully on 5.3.2-1ubuntu4.2
without the patch, i got the error message. After applying it disappeared and Taxonomy Access Control Lite worked correctly.
Comment #7
Pete Harlan CreditAttribution: Pete Harlan commentedShouldn't _tac_lite_user_tids() be similarly modified, since tac_lite_node_grants() passes $account to it?
Patch attached containing both modifications. Comments welcome.
Comment #8
BoobaaPatch looks good, but needs review.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedLatest patch works for me on PHP 5.3.2 and Drupal 6.17
Comment #10
BoobaaDouggough forgot to RTBC this in #9.
Comment #11
Dave Cohen CreditAttribution: Dave Cohen commentedthanks for the patch and for your patience. Checked into DRUPAL-6--1 branch.
Comment #13
Renee S CreditAttribution: Renee S commentedHi Dave,
Thanks for checking this in; I downloaded the latest dev release and two of the functions are fixed, but the third function (which was correct in the patch) looks like:
function tac_lite_node_grants($account, &$op) {
instead of:
function tac_lite_node_grants($account, $op) {
When I fixed that, it worked great.
Comment #14
DREAMER_ES CreditAttribution: DREAMER_ES commentedHi all,
I used the latest dev version and where having the same error.
After changed the line that renee suggested, and that was causing an error logged in the watchdog, it worked as expected.
Thanks all! :D
Comment #15
Renee S CreditAttribution: Renee S commentedGonna make this active again so it'll get seen :)
Comment #16
Dave Cohen CreditAttribution: Dave Cohen commentedSorry about that. I think I have it right now.
Comment #18
dankh CreditAttribution: dankh commentedSorry for reopening this, but please can you put on the module description page that users with PHP 5.3 has to install the current dev version. I was thinking that the warning doesn't break the module, but it does. I'm installing this module for the first time and I wasted 2 hours to understand what I'm not doing right, but then I installed the dev version and everything worked as expected.
Thanks,
Comment #19
faqing CreditAttribution: faqing commentedOnce I deleted the "&". the message disappeared.
Comment #20
Dave Cohen CreditAttribution: Dave Cohen commentedI've never been able to run Drupal 6.x on PHP 5.3. What's the story? Does Drupal 6 support php 5.3 now?
Comment #21
Renee S CreditAttribution: Renee S commentedI'm on 5.3. The latest release - 6.19 - appeared to support it without requiring any patching of core. A few contrib modules don't, but I've been able to work around all of them, and most have patches in their issue queues if not commits. It's mostly minor stuff.
Comment #22
faqing CreditAttribution: faqing commentedMy server is Ubuntu 10.4 and my PHP Version is 5.3.2-1ubuntu4.5. My Drupal is 6.19
My tac_lit is recent dev version.
After I deleted the &
it works OK.
Comment #23
ndrini CreditAttribution: ndrini commentedTo explain better.
To solve this warning, you can delete the & symbols
there're in function tac_lite_node_grants
The function tac_lite_node_grants($account, $op) is
in line 446 of modules/tac_lite/tac_lite.module