Skip to content

saveDocument() - E_DEPRECATED: Couchbase\defaultDecoder(): Passing null to parameter #1 ($bytes) of type string is deprecated #918

Description

@MetroConductor

What type of issue is this?

Exception/Error/Warning/Notice/Deprecation

Operating system + version

Alpine 3.16

PHP version

8.1.22

Connector/Database version (if applicable)

Couchbase CE 7.2.2 + PECL Extension 3.2.2

Phpfastcache version

9.2.0 ✅

Describe the issue you're facing

Whenever storing a new document (that is, a document that doesn't exist yet), I'm faced with the following exception:

E_DEPRECATED: Couchbase\defaultDecoder(): Passing null to parameter #1 ($bytes) of type string is deprecated

Trace:
  #2 [internal function]: Couchbase\defaultDecoder()
  #3 /var/www/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbasev3/Driver.php(117): Couchbase\GetResultImpl->content()
  #4 /var/www/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php(137): Phpfastcache\Drivers\Couchbasev3\Driver->driverReadMultiple()
  #5 /var/www/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/TaggableCacheItemPoolTrait.php(402): Phpfastcache\Drivers\Couchbasev3\Driver->getItems()
  #6 /var/www/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php(487): Phpfastcache\Drivers\Couchbasev3\Driver->driverWriteTags()
  #7 /home/cache/src/Cache.php(343): Phpfastcache\Drivers\Couchbasev3\Driver->save()

The interesting thing is, this is only when saving a document that didn't exist previously; updating works without a hitch. I searched high and low, but I couldn't find anyone describing anything similar. Is anyone familiar with this issue?

Suggestion to fix the issue (optional)

It seems like somehow Couchbase's defaultDecoder is called without a payload, which could be because the document indeed doesn't exist yet. If you ask me, there should be a if to prevent the decoder from being called without data

Have you searched in our Wiki before posting ?

  • I have searched over the Wiki

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions