Problem/Motivation

When a folder id in an a OneHub field is not accessible for some reason, it throws an error:

OneHubApi::callApi returns null or array

$folders = $this->callApi($path);
$this->getItems($folders);

But the function call for getItems is getItems(array $call) so this throws an error.

Proposed resolution

Check the value is an array first before calling.

Remaining tasks

Issue fork onehub-3385686

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ChrisDarke created an issue. See original summary.

chrisdarke’s picture

Status: Needs work » Needs review

Adding merge request

oadaeh made their first commit to this issue’s fork.

  • oadaeh committed fd1b01b4 on 8.x-1.x authored by ChrisDarke
    Issue #3385686 by ChrisDarke: Error thrown by invalid Folder ID
    
oadaeh’s picture

Status: Needs review » Fixed

I've merged this in. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.