Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-694

Allow null to be passed to nullable options and remove \ prefix from return and argument types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0.3
    • None
    • None
    • None
    • 1

    Description

      Original report: https://github.com/couchbase/php-couchbase/pull/28

      A lot of API calls end with some nullable $options variable. But adding null would give an error.

      For example:

      Fatal error: Uncaught TypeError: Argument 2 passed to Couchbase\Collection::get() must be an instance of Couchbase\GetOptions, null given in /opt/php-couchbase/tests/d.php:26
      

      I've added a ! to the zend_parse_parameters call to allow null to be given.

      I also had to make the arguments nullable in the definition in a few cases.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            avsej Sergey Avseyev
            avsej Sergey Avseyev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty