Posted by Boobaa on September 27, 2009 at 3:07pm
| Project: | Taxonomy Access Control Lite |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | PHP 5.3 |
Issue Summary
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.
| Attachment | Size |
|---|---|
| tac_lite-php-5.3.patch | 457 bytes |
Comments
#1
I 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
#2
6.x-1.3 also gives the error reported above, and the patch fixes it.
#3
I haven't tested the patch, but the change looks OK.
#4
I can confirm this. I found it independently and came here to post the patch.
#5
subscribing
#6
I 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.
#7
Shouldn't _tac_lite_user_tids() be similarly modified, since tac_lite_node_grants() passes $account to it?
Patch attached containing both modifications. Comments welcome.
#8
Patch looks good, but needs review.
#9
Latest patch works for me on PHP 5.3.2 and Drupal 6.17
#10
Douggough forgot to RTBC this in #9.
#11
thanks for the patch and for your patience. Checked into DRUPAL-6--1 branch.
#12
Automatically closed -- issue fixed for 2 weeks with no activity.
#13
Hi 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.
#14
Hi 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
#15
Gonna make this active again so it'll get seen :)
#16
Sorry about that. I think I have it right now.
#17
Automatically closed -- issue fixed for 2 weeks with no activity.
#18
Sorry 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,
#19
Once I deleted the "&". the message disappeared.
#20
I'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?
#21
I'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.
#22
My 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 &
function tac_lite_node_grants($account, &$op) {it works OK.