2
0
Просмотр исходного кода

Make changes as commented by @zenden2k

I've updated the check here to be more cautious; no harm in checking to see if the fields exist before trying to use them!
Stephen Orr 12 лет назад
Родитель
Сommit
dda69c91c2
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      library/Zend/Pdf.php

+ 2 - 1
library/Zend/Pdf.php

@@ -628,7 +628,8 @@ class Zend_Pdf
         
         foreach ($root->AcroForm->Fields->items as $field)
         {
-            if ( $field->FT->value == 'Tx' && $field->T !== null ) /* We only support fields that are textfields and have a name */
+            /* We only support fields that are textfields and have a name */
+            if ( $field->FT && $field->FT->value == 'Tx' && && $field->T && $field->T !== null ) 
             {
                 $this->_formFields[$field->T->value] = $field;
             }