mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed exception if octopart did not returned an category for a part
This commit is contained in:
parent
ffe76f9d2e
commit
5750e7dbdf
1 changed files with 1 additions and 1 deletions
|
@ -294,7 +294,7 @@ class OctopartProvider implements InfoProviderInterface
|
|||
|
||||
//Built the category full path
|
||||
$category = null;
|
||||
if ($part['category']['name'] !== null) {
|
||||
if (!empty($part['category']['name'])) {
|
||||
$category = implode(' -> ', array_map(fn($c) => $c['name'], $part['category']['ancestors'] ?? []));
|
||||
if (!empty($category)) {
|
||||
$category .= ' -> ';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue