Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25337

URIElement siteaccess matcher passes wrong value when setting value > 1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: 5.4.5
    • Fix Version/s: Customer request, 5.4.6, 16.02
    • Component/s: Misc
    • Labels:
      None

      Description

      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Nuno Oliveira (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: