Skip to content

Commit

Permalink
Allow configuration paths based on system.xml
Browse files Browse the repository at this point in the history
Resolves #27678
  • Loading branch information
navarr authored Jan 12, 2021
1 parent 63434d2 commit c7b5a73
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/code/Magento/Config/Model/Config/PathValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public function __construct(Structure $structure)
*/
public function validate($path)
{
$element = $this->structure->getElementByConfigPath($path);
if ($element->getConfigPath()) {
$path = $element->getConfigPath();
}

$allPaths = $this->structure->getFieldPaths();

if (!array_key_exists($path, $allPaths)) {
Expand Down

0 comments on commit c7b5a73

Please sign in to comment.