Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
dda69c91c2
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  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)
         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;
                 $this->_formFields[$field->T->value] = $field;
             }
             }