* notice: Undefined index: teaser in /drupal6/sites/all/modules/print/print.module on line 411.
* notice: Undefined index: node in /drupal6/sites/all/modules/print/print.module on line 415.
* notice: Undefined index: teaser in /drupal6/sites/all/modules/print/print_mail.module on line 227.
* notice: Undefined index: node in /drupal6/sites/all/modules/print/print_mail.module on line 231.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kevinweber’s picture

Status: Active » Needs review
FileSize
783 bytes
798 bytes

I've attached patches that will fix the above errors.

jcnventura’s picture

Title: Several undefined index errors » Several undefined index notices
Status: Needs review » Fixed

Hi,

Just committed the code to fix these notices.

João

eMPee584’s picture

Version: 6.x-1.0-rc9 » 6.x-1.x-dev
Status: Fixed » Active

Message: Undefined variable: path in /var/www/drupal-hfopi/sites/all/modules/print/print_pdf/print_pdf.module on line 173.
Severity: error

dude the path's not set, causing this error on each and every site view in both print and print_pdf modules....!!
maybe you should add this to the very top of your drupal index.php:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

or maybe don't drink and code *g

jcnventura’s picture

Status: Active » Fixed

Hi,

It's amazing that people actually go out of their way to promote notices to errors in PHP and then complain that the harmless notices are causing errors..

Thanks for reporting this, when the next dev gets generated, these warnings should no longer show up.

João

eMPee584’s picture

yeah right multiple error entries hitting the watchdog table PER PAGEVIEW is totally acceptable *g

from Developer documentation > Coding standards > Write E_ALL compliant code @ http://drupal.org/node/34341

E_ALL: a better practice

Currently, the Drupal code is not E_STRICT compliant. When running a Drupal site with E_ALL, each page view creates scores of error notices messages. Many developers agree that it would be good if the source of Drupal could be brought up to par with commonly accepted good practice.

another snip, from the 'Best Practices' guide @ http://drupal.org/node/188986:

If you recall from the previous article, I recommend that you install and use the Coder module. In addition to making sure you've adhered to the Drupal coding standards, this module also can give you performance hints and Drupal version upgrade advice.

anyways while the former errors are gone now, new have been showing up since then:
Undefined offset: 8 in /var/www/drupal-hfopi/sites/all/modules/print/print_pdf/tcpdf/tcpdf.php on line 9384.
Undefined index: href in /var/www/drupal-hfopi/sites/all/modules/print/print_pdf/tcpdf/tcpdf.php on line 9755.
i don't blame these on you though, it might be my site or tcpdf. poor watchdog *g

oh and btw

THANK YOU

for keeping up the work :)

jcnventura’s picture

Yes, you will see lots of notices from TCPDF, if you run it with E_ALL.
You will see even more notices from dompdf, even if you're not running with E_ALL.

I usuallly have several screens full of warnings in my Drupal test box. Some are even from Drupal core. That's why I usually have them turned off.

Thanks for the thanks.

João

Anonymous’s picture

Status: Fixed » Closed (fixed)

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