Skip to content

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

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

Closed
momala454 opened this issue Feb 4, 2022 · 2 comments

Comments

@momala454
Copy link

momala454 commented Feb 4, 2022

Description

The following code:

<?php declare(strict_types=1);
error_reporting(E_ALL);
ini_set('display_errors', true); 


$m = new Memcached();
$m->setMulti(['hello' => 'world'], 2);

Resulted in this output:

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

But I expected this output instead:

No error

PHP Version

8.1.2

Operating System

Debian 11.2

@damianwadley
Copy link
Member

@SQ44
Copy link

SQ44 commented Dec 2, 2022

I fixed the issue by updating memcahed, i run sudo apt install php8.1-memcached which updated my memcached to 3.2

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

No branches or pull requests

3 participants