Closed mnabialek closed 7 years ago
I'm using DomPDF 0.7 for this and I use code something like this:
<table> <tr class="title"> <td colspan="2"> Some text </td> </tr> <tr class="links"> <td> <a href="http://xxx"><strong>xxx</strong></a> </td> <td> <a href="mailto:yyy><strong>yyy</strong></a> </td> </tr> </table>
The problem here is that when I use <strong> inside 3rd <td> I'm getting undefined ofsset 1 in BinaryStream for this loop:
<strong>
<td>
for ($i = 0; $i < $type[1]; $i++) { $ret += $this->w($type[0], $data[$i]); }
As soon as I remove <strong> so I have code like this:
<a href="mailto:yyy>yyy</a>
no error appears. Exactly same situation is when I use CSS font-weight: bold instead of <strong> tag.
font-weight: bold
The solution that seems to be working is replacing the code I showed above into:
for ($i = 0; $i < $type[1]; $i++) { if (array_key_exists($i, $data)) { $ret += $this->w($type[0], $data[$i]); } }
everything works as expected. If approved I can create pull request for this.
ref #50
Fixed by 010c3e0e22a9ab0d9f93678692c80865f041e2d2
I'm using DomPDF 0.7 for this and I use code something like this:
The problem here is that when I use
<strong>
inside 3rd<td>
I'm getting undefined ofsset 1 in BinaryStream for this loop:As soon as I remove
<strong>
so I have code like this:no error appears. Exactly same situation is when I use CSS
font-weight: bold
instead of<strong>
tag.The solution that seems to be working is replacing the code I showed above into:
everything works as expected. If approved I can create pull request for this.