X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=blobdiff_plain;f=classes%2Fdocument.php-class;h=ed688b6e38b3c7dd50b38f41e68bc9ebdfeae3cf;hp=a0800f2889c4643a36164cedd901820fdc823978;hb=5ae00086e5e4a5ffe979d5462b388d8277417e9f;hpb=b589759193db92c7839f5d5d5d926733a7e76d26 diff --git a/classes/document.php-class b/classes/document.php-class index a0800f2..ed688b6 100755 --- a/classes/document.php-class +++ b/classes/document.php-class @@ -173,8 +173,7 @@ class ExtendedDocument extends DOMDocument { // returns an ExtendedElement that is an HTML with the given src and alt attributes (set to '' by default) // // public function createElementForm($action, $method, $name) - // returns an ExtendedElement that is an HTML
that is a child of an HTML
- // with the given action, method, and name + // returns an ExtendedElement that is an HTML with the given action, method, and name // // public function createElementInputHidden($name, $value) // returns an ExtendedElement that is an HTML of type 'hidden' with the given name and value @@ -440,7 +439,7 @@ class ExtendedDocument extends DOMDocument { public function createElement($name, $value = '') { // Adding the $value in DOMDocument's createElement does NOT escape it, so override it and use appendText to support that. $aelem = parent::createElement($name); - if (strlen($value)) { $aelem->appendText($value); } + if (strlen($value ?? '')) { $aelem->appendText($value); } return $aelem; }