You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By documentation: DOMXPath->query() returns DOMNodeList and DOMNodeList->item() returns DOMNode which doesn't have getAttribute. Sometimes that DOMNode is DOMElement, but this cannot be hardcoded in every case.
Intelephense doesn't recognize the getAttribute method for a DOM object
To Reproduce
<?php $html = "<figure class='thumbnail '><span class='ACrL3ZACrpZGVvL3BsYXllcl9nZW5fY21lZGlhPTE5NDM2NzcwJmNmaWxtPTkyODYuaHRtbA== thumbnail-container thumbnail-link' title='xxxxxxxx'><img class='thumbnail-img' src='http://site.com/path/xxxx.jpg' alt='xxxxxx' width='216' height='288' /></span></figure>?>";
{
"resource": "/path/test5.php",
"owner": "generated_diagnostic_collection_name#2",
"code": "1013",
"severity": 8,
"message": "Undefined method 'getAttribute'.",
"source": "intelephense",
"startLineNumber": 30,
"startColumn": 67,
"endLineNumber": 30,
"endColumn": 79
}
Platform and version
win10
The text was updated successfully, but these errors were encountered: