diff --git a/xfdf.inc b/xfdf.inc
index e861ac6366c699a6ad28cbec088479498ebbb700..9f0a6202b16a38bb08cf71723a480fb5e82b1160 100644
--- a/xfdf.inc
+++ b/xfdf.inc
@@ -33,7 +33,7 @@ function create_xfdf($file, array $info, $enc = 'UTF-8') {
     $field_ele->setAttribute('name', $name);
 
     $value_ele = $field_ele->appendChild($doc->createElement('value'));
-    $value_ele->appendChild($doc->createTextNode($value));
+    $value_ele->appendChild($doc->createTextNode($value ?: ''));
   }
 
   $ids_ele = $xfdf_ele->appendChild($doc->createElement('ids'));