-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning: Trying to access array offset on value of type null in ...\tcpdf.php on line 2468 #564
Comments
@BrainforgeUK Could you provide an example of code generating this error ? |
I don't know how it got into the state where $this->cell_padding = null This is one of a number of occassions where earlier versions would silently ignore the error, and it is often benign anyway - maybe in this instance a value of 0 would be assumed. PHP 7.4 and 8 are less forgiving and the unexpected / 'this will never happen' has to be coded for! - such as here. |
I can confirm that I had the same issue as of PHP 7.4 onwards, using TCPDF v6.6.2 @BrainforgeUK - your example is missing a close bracket BTW ;) @jausions - The errors would be something like the attached screenshot. So the full function should maybe look something like this:
Hope this helps! |
Thanks @kosmro |
I'll look into it tonight :) |
Tested and confirmed working in PHP 7.4 and PHP 8.2
Can you close this issue ? |
Cannot generate output due to ... TCPDF ERROR: Some data has already been output, can't send PDF file
Solution I implemented using a class override ...
`
public function getCellHeight($fontsize, $padding=TRUE) {
`
The text was updated successfully, but these errors were encountered: