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

RemoteId Criterion not working with integer value

    XMLWordPrintable

Details

    Description

      When i try to perform a query with a numeric remote, i get a database error.
      When i explicitly cast it to a string value it works, but the static code analysis fails (as the docblock of the criterion says, that an int is required).

      $filter = new Criterion\RemoteId(123);
      $this->searchSvc->findSingle($filter);
      

      fails

      $filter = new Criterion\RemoteId((string)123);
      $this->searchSvc->findSingle($filter);
      

      works

      I would suggest at least updating the docblock or doing a type casting inside the constructor to be on the safe side.

      I will try to create a pull request, addressing this issue.

      Attachments

        Activity

          People

            Unassigned Unassigned
            9dcdb0dd-5caa-459b-93b0-1ce97332c3fa@accounts.ibexa.co Hannes Giesenow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: