Wrong information in producers array if there are no producers
Issue #90
resolved
Issue: The producer array in the anime API response is having an inappropiate value only when the producers data is missing from MAL. Filtering through that specific node links is right when the data is present, but if the data is not available MAL display "add some" link and the parser considers this a valid data.
Sample: https://api.atarashiiapp.com/2/anime/32448
Solution I am using.
$producers = [];
foreach($records as $rItem) {
if($rItem->hasAttribute('title') && $rItem->nodeValue !== 'add more') {
$producers[] = $rItem->nodeValue;
}
}
Comments (2)
-
-
- changed status to resolved
Fix wrong information in producers array if there are no producers. Fixes
#90→ <<cset a4fd48335a9e>>
- Log in to comment
Many thanks for reporting this issue ^^