Skip to content

Cache issue and fix for TypeError: Argument 2 passed to erLhcoreClassCacheStorage::store() must be of the type array, int given, called in /opt/livehelperchat/lhc_web/lib/core/lhtpl/tpl.php on line 547 #1713

@Queue-Fair

Description

@Queue-Fair

Hi there, couldn't find an easy way to find out if someone has already reported this, but we came across an error that prevented LHC from serving any pages at all, including the login page.

We were able to solve it by modifying tpl.php in two places:

Line 202 becomes:

if ($this->cacheEnabled == true && isset($this->cacheTemplates) && is_array($this->cacheTemplates) && key_exists(md5($fileTemplate.$instance->WWWDirLang.$instance->Language.$port),$this->cacheTemplates))

and line 532 becomes:

if(isset($this->cacheTemplates) && is_array($this->cacheTemplates)) {
$this->cacheTemplates[md5($fileTemplate.$instance->WWWDirLang.$instance->Language.$port)] = $file;
$this->storeCache();
}

With these changes we were able to log in again.

Any idea what might have caused this? Anything else we need to do? I'm worried that there may be an underlying fault here.

Hope this helps someone!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions