Skip to content

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

Closed
@momala454

Description

@momala454

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions