Skip to content

Wrongly assume _root is valid #216

@barbazul

Description

@barbazul

I just run an impor with a typo in the value for _root which ended in an unhandled exception:

Warning: reset() expects parameter 1 to be array, null given in /basedir/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Category.php on line 799

A possible fix would be:

} elseif (isset($this->_categoriesWithRoots[$rowData[self::COL_ROOT]])) {
    return reset($this->_categoriesWithRoots[$rowData[self::COL_ROOT]]);
} else {
    return false;
}

Which causes the error Parent Category is not found, add parent first to be displayed in those cases.

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