fixed invalid font substr
authorPetr Skoda <skodak@moodle.org>
Sat, 18 Sep 2010 11:21:42 +0000 (11:21 +0000)
committerPetr Skoda <skodak@moodle.org>
Sat, 18 Sep 2010 11:21:42 +0000 (11:21 +0000)
lib/pdflib.php

index 9f9f6a0..9c036aa 100644 (file)
@@ -106,7 +106,7 @@ class pdf extends TCPDF {
             $fontfiles = $this->_getfontfiles(PDF_CUSTOM_FONT_PATH);
 
             if (count($fontfiles) == 1) {
-                $autofontname = substr($fontfile[0], 0, -4);
+                $autofontname = substr($fontfiles[0], 0, -4);
                 $this->AddFont($autofontname, '', $autofontname.'.php');
                 $this->SetFont($autofontname);
             } else if (count($fontfiles == 0)) {