Small patch to remove notices from tac_lite in a few places.

Comments

pletcher’s picture

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

Dave Cohen’s picture

Status: Active » Postponed (maintainer needs more info)

What are the notices?

pletcher’s picture



    * 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

Dave Cohen’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

does #436714: E_ALL compilance solve the problem?

pletcher’s picture

Status: Closed (duplicate) » Postponed (maintainer needs more info)

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

AlexisWilke’s picture

Status: Postponed (maintainer needs more info) » Needs review
Issue tags: +E_ALL
StatusFileSize
new527 bytes

Note that in reference to this statement:

 if (isset($defaults[$rid]) && count($defaults[$rid])) {

Using the empty() function is better:

  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.

AlexisWilke’s picture

In regard to the tag_lite_help() function, just remove the period in the first $output .= ...

$output = "blah";
$output .= "more blah";
return $output;

Thank you.
Alexis

thomas.claes’s picture

Tested the patch attached in comment #6: it works. Can this please be added to the module?

AlexisWilke’s picture

Status: Needs review » Reviewed & tested by the community

Marking as RTBC. 8-)

vladimiraus’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (outdated)

Drupal 6 is no longer supported.