Skip to content

Warning Undefined array key “updating” ee/ExpressionEngine/Service/File/Usage.php, line 59 #4417

@robinsowell

Description

@robinsowell

You can get an undefined array key warning when running File usage sync.

    protected function initializeFieldsAndTables()
    {
        $data = ee()->cache->get(self::CACHE_KEY);
        if ($data === false || $data['updating'] === false) {
            $this->buildFieldsAndTables();
            $this->cache();
        } else {

note- cache should '@return mixed value matching $id or FALSE on failure' so that bit should be ok. Just the 'updating' check that may be unset.

SO the OR is correct option above, but somehow updating is simply not set sometimes. Which... really makes no sense. Maybe OLDER versions didn't including updating in the cache. Money bet that's it. Hrm- so I think we do need a new cache- do we need to clear existing before adding?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: AcceptedBug has been confirmed, is reproducible, and ready to work on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions