Issue #1251164: remove undefined constant warning in admin pages when TCPDF is selected.
authorJoao Ventura
Wed, 17 Aug 2011 08:30:04 +0000 (10:30 +0200)
committerJoao Ventura
Wed, 17 Aug 2011 08:30:04 +0000 (10:30 +0200)
print_pdf/print_pdf.module

index 5bebcd2..f386a0e 100644 (file)
@@ -636,7 +636,8 @@ function _print_pdf_tcpdf_version() {
   }
   require_once(DRUPAL_ROOT . '/' . $print_pdf_pdf_tool);
 
-  $pdf = new TCPDF();
+  // Hide warnings, as some TCPDF constants may still be undefined
+  @$pdf = new TCPDF();
 
   return $pdf->getTCPDFVersion();
 }