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.

AttachmentSize
taclite_notices.patch1.89 KB

Comments

#1

Update, please do not apply this patch. While it fixes notices, it breaks other things.

#2

Status:active» postponed (maintainer needs more info)

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

Status:postponed (maintainer needs more info)» closed (duplicate)

does #436714: E_ALL compilance solve the problem?

#5

Status:closed (duplicate)» postponed (maintainer needs more info)

Just updated to latest 6--1, not fixed.

#6

Status:postponed (maintainer needs more info)» needs review

Note that in reference to this statement:

<?php
if (isset($defaults[$rid]) && count($defaults[$rid])) {
?>

Using the empty() function is better:

<?php
 
if (!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.

AttachmentSize
tac_lite-6.x-notices.patch 527 bytes

#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

Status:needs review» reviewed & tested by the community

Marking as RTBC. 8-)