Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
Showing only changes of commit fec671e3cd - Show all commits

View File

@ -269,12 +269,17 @@ final class Model
*/
private function getMediaIdFromMalId(string $malId, string $type = 'ANIME'): ?string
{
if ($malId === '')
{
return NULL;
}
$info = $this->runQuery('MediaIdByMalId', [
'id' => $malId,
'type' => mb_strtoupper($type),
]);
if (empty($info) || empty($info['data']))
if (array_key_exists('errors', $info))
{
return NULL;
}