mirror of
https://github.com/tecnickcom/TCPDF.git
synced 2025-03-21 22:49:39 +01:00
Update tcpdf.php
Add an additional empty test to prevent error in PHP 7.2. Without this test, the variables might get initialized as an empty string, which will lead to an error during the following multiplication. There might be more lines with this problem - these are the ones I found.
This commit is contained in:
parent
367241059c
commit
21bb4fdfd5
@ -18686,7 +18686,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
$hbz = 0; // distance from y to line bottom
|
||||
$hb = 0; // vertical space between block tags
|
||||
// calculate vertical space for block tags
|
||||
if (isset($this->tagvspaces[$tag['value']][0]['h']) AND ($this->tagvspaces[$tag['value']][0]['h'] >= 0)) {
|
||||
if (isset($this->tagvspaces[$tag['value']][0]['h']) && !empty($this->tagvspaces[$tag['value']][0]['h']) && ($this->tagvspaces[$tag['value']][0]['h'] >= 0)) {
|
||||
$cur_h = $this->tagvspaces[$tag['value']][0]['h'];
|
||||
} elseif (isset($tag['fontsize'])) {
|
||||
$cur_h = $this->getCellHeight($tag['fontsize'] / $this->k);
|
||||
@ -18718,7 +18718,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
}
|
||||
// closing vertical space
|
||||
$hbc = 0;
|
||||
if (isset($this->tagvspaces[$tag['value']][1]['h']) AND ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) {
|
||||
if (isset($this->tagvspaces[$tag['value']][1]['h']) && !empty($this->tagvspaces[$tag['value']][1]['h']) && ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) {
|
||||
$pre_h = $this->tagvspaces[$tag['value']][1]['h'];
|
||||
} elseif (isset($parent['fontsize'])) {
|
||||
$pre_h = $this->getCellHeight($parent['fontsize'] / $this->k);
|
||||
@ -19379,7 +19379,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
$hbz = 0; // distance from y to line bottom
|
||||
$hb = 0; // vertical space between block tags
|
||||
// calculate vertical space for block tags
|
||||
if (isset($this->tagvspaces[$tag['value']][1]['h']) AND ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) {
|
||||
if (isset($this->tagvspaces[$tag['value']][1]['h']) && !empty($this->tagvspaces[$tag['value']][1]['h']) && ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) {
|
||||
$pre_h = $this->tagvspaces[$tag['value']][1]['h'];
|
||||
} elseif (isset($parent['fontsize'])) {
|
||||
$pre_h = $this->getCellHeight($parent['fontsize'] / $this->k);
|
||||
|
Loading…
x
Reference in New Issue
Block a user