Skip to content

Uncaught Exception: Error 400 'invideoPromotion' ; #80

@ahmet700

Description

@ahmet700

$channel = $youtube->getChannelById('UC78h1xpnf0nzr24-oZX1qAw');

Fatal error: Uncaught Exception: Error 400 'invideoPromotion' : unknownPart in Youtube.php:530

public function decodeSingle(&$apiData) { $resObj = json_decode($apiData); if (isset($resObj->error)) { $msg = "Error " . $resObj->error->code . " " . $resObj->error->message; if (isset($resObj->error->errors[0])) { $msg .= " : " . $resObj->error->errors[0]->reason; } --------->This error line throw new \Exception($msg,$resObj->error->code); } else { $itemsArray = $resObj->items; if (!is_array($itemsArray) || count($itemsArray) == 0) { return false; } else { return $itemsArray[0]; } } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions