Closed (fixed)
Project:
Printer, email and PDF versions
Version:
6.x-1.0-rc3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 May 2008 at 02:15 UTC
Updated:
2 Jun 2008 at 16:32 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| print_set_defaults.patch | 450 bytes | kevinweber |
Comments
Comment #1
jcnventuraHi,
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...
Comment #2
kevinweber commentedI like your idea better. Glad I could help a little.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.