From da8e7efd5f6301bb07ac205f8dae87b6a25dcf43 Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Sun, 2 Sep 2018 20:12:52 +0200 Subject: [PATCH] deal with empty link value --- classes/document.php-class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/document.php-class b/classes/document.php-class index 5a60615..e98d292 100755 --- a/classes/document.php-class +++ b/classes/document.php-class @@ -335,7 +335,7 @@ class ExtendedDocument extends DOMDocument { } public function createElementLink($target, $value = '') { - $link = $this->createElement('a', $value); + $link = $this->createElement('a', (strlen($value) ? $value : $target)); $link->setAttribute('href', $target); // XXX: take care of & etc. in links return $link; } -- 2.43.0