Skip to content

$resource->Context->getOption throws errors #21

@christianseel

Description

@christianseel

My MODX error log is full of this:
(ERROR @ /core/model/modx/modcontext.class.php : 128) PHP warning: array_merge(): Argument #1 is not an array

It's caused by $resource->Context->getOption() in the /lib/StatCache.php file.

I fixed it by adding $context = $this->modx->getContext( $resource->get('context_key') ); and replacing $resource->Context->getOption() with $context->getOption().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions