Skip to content

TypeError in MemcachedHandler::__construct() #1204

Description

@MikeVIP

Today during the tests of the "cache" library I came across an error (in Memcached driver):

TypeError
Argument 1 passed to CodeIgniter\Cache\Handlers\MemcachedHandler::__construct() must be of the type array, object given, called in (...)/system/Cache/CacheFactory.php on line 80

Configuration of my server:

  • PHP 7.2.9;
  • memcached 3.0.4

This is my temporary solution (system/Cache/Handlers/MemcachedHandler.php):
Edit function "__construct" and remove declarations "array" in function argument, next before:

$this->prefix = $config['prefix'] ?? '';

add:

$config = (array)$config;

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions