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

URIElement siteaccess matcher passes wrong value when setting value > 1

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nuno.oliveira-obsolete@ez.no Nuno Oliveira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: