We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfe3d05 commit 8050285Copy full SHA for 8050285
src/XfdfFile.php
@@ -218,11 +218,14 @@ protected function writeFields($fp, $fields)
218
}
219
220
/**
221
- * @param string $value the value to encode
222
- * @return string the value correctly encoded for use in a XML document
+ * @param string|null $value the value to encode
+ * @return string|null the value correctly encoded for use in a XML document
223
*/
224
protected function xmlEncode($value)
225
{
226
+ if ($value === null) {
227
+ return null;
228
+ }
229
return defined('ENT_XML1') ?
230
htmlspecialchars($value, ENT_XML1, 'UTF-8') :
231
htmlspecialchars($value);
0 commit comments