Skip to content

Commit

Permalink
fix access syntax with curly braces is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet authored and mrubinsk committed Nov 2, 2019
1 parent babf6ec commit 3e164ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Horde/Pdf/Writer.php
Expand Up @@ -1198,7 +1198,7 @@ public function getStringWidth($text, $pt = false)
$width = 0;
$length = strlen($text);
for ($i = 0; $i < $length; $i++) {
$width += $this->_current_font['cw'][$text{$i}];
$width += $this->_current_font['cw'][$text[$i]];
}

/* Adjust for word spacing. */
Expand Down Expand Up @@ -2138,7 +2138,7 @@ public function write($height, $text, $link = '')
$nl = 1;
while ($i < $nb) {
// Get next character.
$c = $s{$i};
$c = $s[$i];
if ($c == "\n") {
// Explicit line break.
$this->cell($width, $height, substr($s, $j, $i - $j), 0, 2, '', 0, $link);
Expand Down

0 comments on commit 3e164ee

Please sign in to comment.