Skip to content

Commit

Permalink
Merge pull request #76 from primus852/patch-1
Browse files Browse the repository at this point in the history
Fixed a PHP Warning
  • Loading branch information
madcoda authored Jul 5, 2021
2 parents fa746a5 + 556c8e6 commit 70debe2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Youtube.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@ public function decodeSingle(&$apiData)
}
throw new \Exception($msg, $resObj->error->code);
} else {
if(!property_exists($resObj, 'items')){
return false;
}
$itemsArray = $resObj->items;
if (!is_array($itemsArray) || count($itemsArray) == 0) {
return false;
Expand Down

0 comments on commit 70debe2

Please sign in to comment.