Explorar o código

[ZF-11943] Fix warning emitted from Zend_Pdf_Resource_Font_CidFont when glyph width is null

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24664 44c647ce-9c0f-0410-b52a-842ac1e357ba
adamlundrigan %!s(int64=14) %!d(string=hai) anos
pai
achega
57db0ee78e
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      library/Zend/Pdf/Resource/Font/CidFont.php

+ 3 - 1
library/Zend/Pdf/Resource/Font/CidFont.php

@@ -129,7 +129,9 @@ abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
         $charGlyphs  = $this->_cmap->getCoveredCharactersGlyphs();
         $charWidths  = array();
         foreach ($charGlyphs as $charCode => $glyph) {
-            $charWidths[$charCode] = $glyphWidths[$glyph];
+            if(isset($glyphWidths[$glyph]) && !is_null($glyphWidths[$glyph])) {
+                $charWidths[$charCode] = $glyphWidths[$glyph];
+            }
         }
         $this->_charWidths       = $charWidths;
         $this->_missingCharWidth = $glyphWidths[0];