PHP notice in linkify_element
-
First off, thank you for your very practical plugin!
I stumbled across a fairly minor bug, where a PHP notice is triggered (although it still functions correctly):
Notice: Undefined property: DiDom\Document::$tag in /landingpages/webroot/wp-content/plugins/gallery-custom-links/mgcl_core.php on line 122
The loop checks the tag for each node as it walk upward in the DOM, but the topmost (document) node does not have a tag. Something like this should prevent the notice:
if (($potentialLinkNode instanceof DiDOM\Element) && ($potentialLinkNode->tag === 'a')) {
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘PHP notice in linkify_element’ is closed to new replies.