Version 5.1 - All the GraphQL #32
@ -158,11 +158,9 @@ final class Kitsu {
|
||||
// The 'canonical' title is always returned
|
||||
$valid = [$data['canonicalTitle']];
|
||||
|
||||
foreach (['titles', 'abbreviatedTitles'] as $key)
|
||||
if (array_key_exists('titles', $data) && is_array($data['titles']))
|
||||
{
|
||||
if (array_key_exists($key, $data) && is_array($data[$key]))
|
||||
{
|
||||
foreach($data[$key] as $alternateTitle)
|
||||
foreach($data['titles'] as $alternateTitle)
|
||||
{
|
||||
if (self::titleIsUnique($alternateTitle, $valid))
|
||||
{
|
||||
@ -170,7 +168,6 @@ final class Kitsu {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $valid;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user