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

TypeError in MemcachedHandler::__construct() #1204

Closed
MikeVIP opened this issue Sep 6, 2018 · 0 comments · Fixed by #1383
Closed

TypeError in MemcachedHandler::__construct() #1204

MikeVIP opened this issue Sep 6, 2018 · 0 comments · Fixed by #1383
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@MikeVIP
Copy link

MikeVIP commented Sep 6, 2018

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;

@jim-parry jim-parry added the bug Verified issues on the current code behavior or pull requests that will fix them label Oct 19, 2018
ytetsuro added a commit to ytetsuro/CodeIgniter4 that referenced this issue Oct 29, 2018
Signed-off-by: ytetsuro <[email protected]>
ytetsuro added a commit to ytetsuro/CodeIgniter4 that referenced this issue Oct 30, 2018
Signed-off-by: ytetsuro <[email protected]>
lonnieezell added a commit that referenced this issue Oct 31, 2018
fix TypeError in MemcachedHandler::__construct()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants