Skip to content

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

Open

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().

Activity

  1. chrisdempsey commented on Dec 15, 2015

    @chrisdempsey

    Fix confirmed working - thanks Christian.

  2. added a commit that references this issue on Mar 7, 2018
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions