diff --git a/src/LynX39/LaraPdfMerger/tcpdf/include/tcpdf_filters.php b/src/LynX39/LaraPdfMerger/tcpdf/include/tcpdf_filters.php index dfb80c5..3bb89c0 100644 --- a/src/LynX39/LaraPdfMerger/tcpdf/include/tcpdf_filters.php +++ b/src/LynX39/LaraPdfMerger/tcpdf/include/tcpdf_filters.php @@ -279,7 +279,7 @@ public static function decodeFilterLZWDecode($data) { // convert string to binary string $bitstring = ''; for ($i = 0; $i < $data_length; ++$i) { - $bitstring .= sprintf('%08b', ord($data{$i})); + $bitstring .= sprintf('%08b', ord($data[$i])); } // get the number of bits $data_length = strlen($bitstring); @@ -376,7 +376,7 @@ public static function decodeFilterRunLengthDecode($data) { $i = 0; while($i < $data_length) { // get current byte value - $byte = ord($data{$i}); + $byte = ord($data[$i]); if ($byte == 128) { // a length value of 128 denote EOD break; @@ -389,7 +389,7 @@ public static function decodeFilterRunLengthDecode($data) { } else { // if length is in the range 129 to 255, // the following single byte shall be copied 257 - length (2 to 128) times during decompression - $decoded .= str_repeat($data{($i + 1)}, (257 - $byte)); + $decoded .= str_repeat($data[($i + 1)], (257 - $byte)); // move to next block $i += 2; } diff --git a/src/LynX39/LaraPdfMerger/tcpdf/include/tcpdf_images.php b/src/LynX39/LaraPdfMerger/tcpdf/include/tcpdf_images.php index c2e3c36..018f243 100644 --- a/src/LynX39/LaraPdfMerger/tcpdf/include/tcpdf_images.php +++ b/src/LynX39/LaraPdfMerger/tcpdf/include/tcpdf_images.php @@ -315,7 +315,7 @@ public static function _parsepng($file) { if ($n > 0) { $trns = array(); for ($i = 0; $i < $n; ++ $i) { - $trns[] = ord($t{$i}); + $trns[] = ord($t[$i]); } } } diff --git a/src/LynX39/LaraPdfMerger/tcpdf/tcpdi_parser.php b/src/LynX39/LaraPdfMerger/tcpdf/tcpdi_parser.php index cd71661..d8ae6dc 100755 --- a/src/LynX39/LaraPdfMerger/tcpdf/tcpdi_parser.php +++ b/src/LynX39/LaraPdfMerger/tcpdf/tcpdi_parser.php @@ -709,11 +709,11 @@ protected function getRawObject($offset=0, $data=null) { $objtype = ''; // object type to be returned $objval = ''; // object value to be returned // skip initial white space chars: \x00 null (NUL), \x09 horizontal tab (HT), \x0A line feed (LF), \x0C form feed (FF), \x0D carriage return (CR), \x20 space (SP) - while (strspn($data{$offset}, "\x00\x09\x0a\x0c\x0d\x20") == 1) { + while (strspn($data[$offset], "\x00\x09\x0a\x0c\x0d\x20") == 1) { $offset++; } // get first char - $char = $data{$offset}; + $char = $data[$offset]; // get object type switch ($char) { case '%': { // \x25 PERCENT SIGN @@ -744,10 +744,10 @@ protected function getRawObject($offset=0, $data=null) { if ($char == '(') { $open_bracket = 1; while ($open_bracket > 0) { - if (!isset($data{$strpos})) { + if (!isset($data[$strpos])) { break; } - $ch = $data{$strpos}; + $ch = $data[$strpos]; switch ($ch) { case '\\': { // REVERSE SOLIDUS (5Ch) (Backslash) // skip next character @@ -792,7 +792,7 @@ protected function getRawObject($offset=0, $data=null) { } case '<': // \x3C LESS-THAN SIGN case '>': { // \x3E GREATER-THAN SIGN - if (isset($data{($offset + 1)}) AND ($data{($offset + 1)} == $char)) { + if (isset($data[($offset + 1)]) AND ($data[($offset + 1)] == $char)) { // dictionary object $objtype = PDF_TYPE_DICTIONARY; if ($char == '<') { @@ -815,7 +815,7 @@ protected function getRawObject($offset=0, $data=null) { break; } default: { - $frag = $data{$offset} . @$data{$offset+1} . @$data{$offset+2} . @$data{$offset+3}; + $frag = $data[$offset] . @$data[$offset+1] . @$data[$offset+2] . @$data[$offset+3]; switch ($frag) { case 'endo': // indirect object @@ -892,16 +892,16 @@ private function getDictValue($offset, &$data) { $dict = ''; $offset += 2; do { - if ($data{$offset} == '>' && $data{$offset+1} == '>') { + if ($data[$offset] == '>' && $data[$offset+1] == '>') { $i--; $dict .= '>>'; $offset += 2; - } else if ($data{$offset} == '<' && $data{$offset+1} == '<') { + } else if ($data[$offset] == '<' && $data[$offset+1] == '<') { $i++; $dict .= '<<'; $offset += 2; } else { - $dict .= $data{$offset}; + $dict .= $data[$offset]; $offset++; } } while ($i>0); @@ -1390,7 +1390,8 @@ private function _getPageRotation($obj) { // $obj = /Page return false; } else { $res = $this->_getPageRotation($obj[1][1]['/Parent']); - if ($res[0] == PDF_TYPE_OBJECT) + + if (is_array($res) && $res[0] == PDF_TYPE_OBJECT) return $res[1]; return $res; }