Error. when click submit form.

Strict warning: Declaration of W2PDF::setHeaderData() should be compatible with that of TCPDF::setHeaderData() in include_once() (line 9 of /home/rma/domains/xxx.com/public_html/sites/all/modules/contrib/webform2pdf/webform2pdf.class.inc).

Comments

rutan65’s picture

I see the same warning but my scenario is as follows:
1. I click on a Menu tab
2. I click on View previous submissions
3. I click on Download PDF for one of the submissions
4. The PDF is successfully downloaded and viewed
5. The first time I click on any Menu tab again I get the warning.
6. For subsequent clicks on any Menu tab everything is normal(no warning)

IgnacioAlonso’s picture

mr.york’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

I don't reproduce. I tested TCPDF 5.9.075, 5.9.165 and 6.0.020 versions.
What version of tcpd are you using?

donaldp’s picture

I am getting this error intermittently with TCPDF version 6.0.020.
PHP version 5.2.17

donaldp’s picture

You won't be able to see these warnings if your PHP installation is not setup to show them.

https://drupal.org/node/1056468

cybermache’s picture

I am seeing this after form submission and as a logged in and anonymous user.

PHP 5.4.12
TCPDF 6.0.042
Drupal 7.23
Webform 7.x-3.19

I have also added these patches
https://drupal.org/node/1950550
https://drupal.org/node/2029527

cybermache’s picture

I turned off error reporting in my maintenance settings which of course stops it from being displayed on the webform pages, but the error still shows up on the system logs.

I think it's is also important to note that this error does not seem to cause any problems with creating the PDF or attaching it to the emails I have it set up to send.

donaldp’s picture

The problem is caused by the TCPDF library class declaring the function setHeaderData itself with different calling parameters to those defined in the Webform2PDF decleration.
Both seem to be trying to do similar things. I've not looked into the history of TCPDF to see if this is a function that was added later after Webform2PDF defined it, or if the calling parameters were changed at some point.
As cybermache says, this does not cause any problems with creating the PDF.
The fix would be to rename the Webform2PDF function or to redefine it with the same parameters as the TCPDF version.

mr.york’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.75 KB

Thank you help with me.

mr.york’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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