fixed invalid font substr

This commit is contained in:
Petr Skoda 2010-09-18 11:21:42 +00:00
parent 230405214f
commit e05fbdd8d8

View 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)) {