Posted by pletcher on March 1, 2009 at 11:44am
| Project: | Taxonomy Access Control Lite |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
| Issue tags: | E_ALL |
Issue Summary
Small patch to remove notices from tac_lite in a few places.
| Attachment | Size |
|---|---|
| taclite_notices.patch | 1.89 KB |
Comments
#1
Update, please do not apply this patch. While it fixes notices, it breaks other things.
#2
What are the notices?
#3
* notice: Undefined index: priority in /home/navacct/drupal/modules/node/node.module on line 2201.* notice: Undefined index: priority in /home/navacct/drupal/modules/node/node.module on line 2201.
* notice: Undefined index: priority in /home/navacct/drupal/modules/node/node.module on line 2201.
* notice: Undefined index: grant_update in /home/navacct/drupal/modules/node/node.module on line 2250.
* notice: Undefined index: grant_delete in /home/navacct/drupal/modules/node/node.module on line 2250.
* notice: Undefined index: grant_view in /home/navacct/drupal/modules/node/node.module on line 2249.
* notice: Undefined index: grant_view in /home/navacct/drupal/modules/node/node.module on line 2250.
* notice: Undefined index: grant_delete in /home/navacct/drupal/modules/node/node.module on line 2250.
* notice: Undefined index: grant_view in /home/navacct/drupal/modules/node/node.module on line 2249.
* notice: Undefined index: grant_update in /home/navacct/drupal/modules/node/node.module on line 2249.
* notice: Undefined index: grant_view in /home/navacct/drupal/modules/node/node.module on line 2250.
* notice: Undefined index: grant_update in /home/navacct/drupal/modules/node/node.module on line 2250.
The patch I wrote removed the notices, it just also broke tac_lite it turns out. Not really what I was going for.
I'll be happy to provide any other info, either here or on irc (jrp).
Thanks,
jrp
#4
does #436714: E_ALL compilance solve the problem?
#5
Just updated to latest 6--1, not fixed.
#6
Note that in reference to this statement:
<?phpif (isset($defaults[$rid]) && count($defaults[$rid])) {
?>
Using the empty() function is better:
<?phpif (!empty($defaults[$rid])) {
?>
That way you avoid the call to the count() function altogether.
This being said, I have my own patch... 8-} I think you can just define the 3 missing entries in the $grant assignment instead. Again, you avoid a call to array_merge(), instead you create the correct array from the start.
#7
In regard to the tag_lite_help() function, just remove the period in the first $output .= ...
<?php$output = "blah";
$output .= "more blah";
return $output;
?>
Thank you.
Alexis
#8
Tested the patch attached in comment #6: it works. Can this please be added to the module?
#9
Marking as RTBC. 8-)