All I am doing is write locking the document using “getAndLock()” then later in the function I am using “unlock()” to unlock it, “unlock()” errors as shown below.
Couchbase\Exception: LCB_EINVAL_MCD: A badly formatted packet was sent to the server. Please report this in a bug in file…
// -- Instantiating a new CouchbaseConnection class.
$connection = new CouchbaseConnect;
// -- Grabbing the bucket.
$bucket = $connection->main($patch['bucket_id']);
// -- Grabbing and locking the document (1 second).
$document = $bucket->getAndLock($request['document_id'], 1);
$bucket->unlock($request['document_id']);
// -- Patching the couchbase document.
$bucket->replace($patch['document_id'], $patched_values);