Errors:
Undefined variable: node_type in /home/kevin/public_html/pgb_dev/drupal6/sites/all/modules/print/print.module on line 141.
Undefined variable: print_display_comment in /home/kevin/public_html/pgb_dev/drupal6/sites/all/modules/print/print.module on line 143.

Steps to reproduce:
1) Enable print module for nodes, but not comments.
2) Create a node.
=> No errors.
3) Add comments.
=> Both errors appear for each comment you have added.

I think that for each comment the above variables were not being set. I've attached a patch that has fixed this for me. Tell me what you think.

CommentFileSizeAuthor
print_set_defaults.patch450 byteskevinweber

Comments

jcnventura’s picture

Status: Needs review » Fixed

Hi,

Thanks for the patch.. I chose not to use it, as you were basically duplicating the code in the else above, and the code could be simplified if I merged the two if's at the beginning. Which was what I did.. I have committed the fix to HEAD, so the next dev version will have it..

You can check out the patch here: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/print/print...

kevinweber’s picture

I like your idea better. Glad I could help a little.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.