Skip to content
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

PHP 8.1: Memcached::setMulti() throws invalid type error for $expiration #484

Closed
othercorey opened this issue May 21, 2021 · 4 comments
Closed

Comments

@othercorey
Copy link

I created a php bug initially - https://bugs.php.net/bug.php?id=81063.

TypeError: Memcached::setMulti(): Argument #2 ($expiration) must be of type int, int given

Even when passing an int correctly, it throws an error expecting an int. I don't know if this is related to the implementation, stubs or PHP core. However, no other methods are throwing this error.

@othercorey
Copy link
Author

@krakjoe With the long time since last release and lack of support > php 7.4, do you know if a php-memcached release is planned? I don't know when/how we'll be able to test with this.

@Krakozaber
Copy link

Memcached::setMulti(): Argument #2 ($expiration) must be of type int, int given - php8.1

@LordSimal
Copy link

Would be awesome if @krakjoe or any of the php-memcached-dev team could plan to release a new version including this fix in the near future so PHP 8.1 can properly utilize memcache 😄

@Sedaj
Copy link

Sedaj commented Aug 7, 2024

In case somebody stumbles upon this issue, you can install newer version of php memcached extension from ondrej repositoy

sudo add-apt-repository ppa:ondrej/php

sudo apt update

sudo apt-get install --only-upgrade php8.1-memcached

version 3.1.5 gave this error message, but version 3.2.0 was ok for me

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

No branches or pull requests

4 participants