Skip to content

Commit

Permalink
Merge branch 'staging' of https://github.com/joomla/joomla-cms into j3ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed Aug 31, 2020
2 parents ca56625 + 9dd137e commit b293a6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/src/Form/Rule/FilePathRule.php
Expand Up @@ -54,14 +54,16 @@ public function test(\SimpleXMLElement $element, $value, $group = null, Registry

try
{
$path = Path::check($value);
Path::check($value);
}
catch (\Exception $e)
{
// When there is an exception in the check path this is not valid
return false;
}

return $value === $path;
// When there are no exception this rule should pass.
// See: https://github.com/joomla/joomla-cms/issues/30500#issuecomment-683290162
return true;
}
}

0 comments on commit b293a6d

Please sign in to comment.