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

getReplace() $strategy parameter string, array with COUCHBASE_REPLICA_SELECT not supported

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.0.1
    • 1.2.2
    • library
    • Security Level: Public
    • None
    • - Centos 6.5 X86_64
      - PHP 5.5.12
      - libcouchbase version => 2.3.1

    Description

      According the latest documentation: http://www.couchbase.com/autodocs/couchbase-php-client-1.2.2/classes/Couchbase.html#method_getReplica

      The $strategy parameter should be an string however in the documentation is an array used for the first example: $obj = $cb->getReplica("key", array("strategy" => COUCHBASE_REPLICA_SELECT, "index" => 0));

      The following error is thrown when the COUCHBASE_REPLICA_SELECT strategy is used:
      Fatal error: Uncaught exception 'CouchbaseIllegalArgumentsException' with message 'Strategy must be specified as a string./ Use: "first", "all" or "select")' in

      The PHP snippet:
      <?php
      $replicaDocument = $this->connection->getReplica($id, array("strategy" => COUCHBASE_REPLICA_SELECT, "index" => 0));

      Attachments

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

        Activity

          People

            brett19 Brett Lawson
            hdanes Harry Danes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty