Skip to content

add missing use statement in class DecrementOptions #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

deminy
Copy link
Contributor

@deminy deminy commented Jan 30, 2024

In v4.1.6, the following code piece will fail when executed:

<?php

// ...
$options = new Couchbase\DecrementOptions();
$options->initial(1);
$options->expiry((new DateTimeImmutable())->modify('+5 seconds'));

$collection->binary()->decrement($key, $options);
?>

The error message looks like the following:

Warning: Object of class DateTimeImmutable could not be converted to int in vendor/couchbase/couchbase/Couchbase/DecrementOptions.php on line 123

@cb-sdk-robot
Copy link

Can one of the admins verify this patch?

@avsej avsej merged commit 410bd8f into couchbase:main Feb 4, 2024
@deminy deminy deleted the missing-use-statement branch February 4, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants