applySeoTags() accesses protected $doc->_links property #78
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The
applySeoTags()method inMokoOG.phpaccesses$doc->_links, which is a protected property ofJoomla\CMS\Document\HtmlDocument. This works due to PHP's loose access control in some contexts but is fragile and may break in future Joomla versions.Risk
_linksin a future releaseRecommendation
Use the public API instead:
$doc->getHeadData()to read links$doc->setHeadData()or$doc->addHeadLink()to modify themBranch created:
feature/78-applyseotags-accesses-protected-links-pr