diff --git a/src/Component/Utility/Xfdf.php b/src/Component/Utility/Xfdf.php
index 81bea0d1d93eebdb3217db1a00a423df168be1db..7797c41eca6265c3e02301c32c9438cb9d423f0d 100644
--- a/src/Component/Utility/Xfdf.php
+++ b/src/Component/Utility/Xfdf.php
@@ -37,7 +37,7 @@ class Xfdf {
       $field_ele->setAttribute('name', $name);
 
       $value_ele = $field_ele->appendChild($doc->createElement('value'));
-      $value_ele->appendChild($doc->createTextNode($value ?: ''));
+      $value_ele->appendChild($doc->createTextNode((string) $value));
     }
 
     $ids_ele = $xfdf_ele->appendChild($doc->createElement('ids'));