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).
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | issue-1856428-9-warrning.redeclaration.W2PDF-setHeaderData.patch | 1.75 KB | mr.york |
Comments
Comment #1
rutan65 commentedI 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)
Comment #2
IgnacioAlonso commentedhttps://drupal.org/node/1940000
Comment #3
mr.york commentedI don't reproduce. I tested TCPDF 5.9.075, 5.9.165 and 6.0.020 versions.
What version of tcpd are you using?
Comment #4
donaldp commentedI am getting this error intermittently with TCPDF version 6.0.020.
PHP version 5.2.17
Comment #5
donaldp commentedYou won't be able to see these warnings if your PHP installation is not setup to show them.
https://drupal.org/node/1056468
Comment #6
cybermache commentedI 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
Comment #7
cybermache commentedI 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.
Comment #8
donaldp commentedThe 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.
Comment #9
mr.york commentedThank you help with me.
Comment #10
mr.york commented