Resolved deprecation notice regarding deprecated strlen() of null-value in Write() function#863
Resolved deprecation notice regarding deprecated strlen() of null-value in Write() function#863samy-rd wants to merge 2 commits intotecnickcom:mainfrom
Conversation
…ue in Write() function
|
Thank you very much, @samy-rd, for the fix for the TCPDF 6 is now deprecated and no further changes will be merged into this repository. Please see the pinned issue Thank You - and the Future of TCPDF for the full explanation and the path forward. Null-safety throughout the codebase is enforced by PHPStan in tc-lib-pdf, so deprecation notices of this kind do not arise. If you encounter a related issue there, feel free to open a PR or issue. I am leaving this PR open in case you or anyone else wishes to continue the discussion, but it is unlikely that this PR will ever be merged. Thank you again for your patience and understanding. |
As mentioned in #796 sometimes the following deprecation notice occurs while using
strlen()on a null value (non-string) in thetcpdf->Write()function if its param$txtis null/not given.PHP message: PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in .../tcpdf.php on line 6425;This small fix should handle cases where
$txtis null/not set.