Skip to content
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

Fix PHP8.2 deprecated warnings in getHtmlDomArray() in tcpdf.php #687

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tcpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4427,7 +4427,7 @@
$this->Error('Unknow font type: '.$type.'');
}
// set name if unset
if (!isset($name) OR empty($name)) {

Check failure on line 4430 in tcpdf.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Variable $name in empty() is never defined.
$name = $fontkey;
}
// create artificial font style variations if missing (only works with non-embedded fonts)
Expand Down Expand Up @@ -4470,7 +4470,7 @@
// we are inside an XObject template
$this->xobjects[$this->xobjid]['fonts'][$fontkey] = $this->numfonts;
}
if (isset($diff) AND (!empty($diff))) {

Check failure on line 4473 in tcpdf.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Variable $diff in empty() is never defined.
//Search existing encodings
$d = 0;
$nb = count($this->diffs);
Expand Down Expand Up @@ -16389,6 +16389,8 @@
* @since 3.2.000 (2008-06-20)
*/
protected function getHtmlDomArray($html) {
if(empty($html))
return array();
// array of CSS styles ( selector => properties).
$css = array();
// get CSS array defined at previous call
Expand Down
Loading