Skip to content

Can't get categories of top level (parentId === 0) #15

Description

@filipchuk

Issue report

To get tree (child categories) need to use method \AdobeStock\Api\Client\SearchCategory::getCategoryTree
This method has next lines:
if ($request->getCategoryId() == null) { throw StockApiException::withMessage('Category Id cannot be null'); }

But categories of top level have parentId == 0. And exception thrown in this case

It could be fixed if use strict compare with null
if ($request->getCategoryId() === null) { throw StockApiException::withMessage('Category Id cannot be null'); }

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions