-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: 5.4.5
-
Fix Version/s: Customer request, 5.4.6, 16.02
-
Component/s: Misc
-
Labels:None
It has been verified that the URIElement siteaccess matcher passes a wrong value when the setting value defined in ezpublish.yml is grater than 1.
Ref: https://doc.ez.no/display/EZP/Siteaccess+Matching#SiteaccessMatching-Availablematchers
Steps to reproduce:
1. Prepare a test eZ Publish 5.4 installation, fully updated to 5.4.5;
2. Edit ezpublish/config/ezpublish.yml, and set the URIElement matcher to a value greater than 1:
ezpublish: siteaccess: ... match: URIElement: '2'
3. Edit /vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/MVC/Symfony/SiteAccess/Matcher/URIElement.php and add the following debug code:
public function __construct($elementNumber) { var_dump( (int)$elementNumber ); $this->elementNumber = (int)$elementNumber; }
4. Visit a siteaccess. A "int(2)" debug message would be expected, instead "int(1)" is displayed.