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

setMulti doesn't support pure digit key

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.2.0
    • 1.1.2, 1.1.4
    • library
    • Security Level: Public
    • None
    • Ubuntu 12.04 / Apache 2 / PHP5 / libcouchbase - 2.0.5

    Description

      This bug didn't exist in 1.1.0dp5, but I've seen it before in php-memcached. The issue is when issuing a setMulti() array into CB it doesn't like it if the key is not a string.

      $key = 12345
      $value = 67890

      $value = json_encode($value);
      $array[$key] = $value;

      $cb_obj->setMulti($array,$expire);

      PHP Fatal error: Uncaught exception 'CouchbaseIllegalKeyException' with message 'Invalid key specified (not a string)'

      test2.php(67): Couchbase->setMulti(Array, 604800)

      The reference bug for php-memcached is: https://bugs.php.net/bug.php?id=59016

      After experiencing the issue there I recompiled their newest version and it fixed the problem. I'm not sure if you can dovetail off of that work or not.

      Attachments

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

        Activity

          People

            trond Trond Norbye
            kneeoh Knee Oh
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty