The video-upload module is installed but I haven't configured a Youtube username and password, so the _video_upload_gdata_get_feed() function will fail.
When I run cron, the module tries to call this, then process the results:
$feed = _video_upload_gdata_get_feed(VIDEO_UPLOAD_YOUTUBE_DEFAULT_USER_FEED, $connection);
foreach ($feed as $video) {
// processing here
}
If the _video_upload_gdata_get_feed() function fails, it returns false. foreach expects an array, so throws an error. Wrapping an if statement solves this:
if ($feed = _video_upload_gdata_get_feed(VIDEO_UPLOAD_YOUTUBE_DEFAULT_USER_FEED, $connection)) {
foreach ($feed as $video) {
// processing here
}
}
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| video_upload.admin_.inc_.patch | 3.05 KB | manarth |
Comments
Comment #1
jhedstromThanks manarth, committed to 6.x.
Comment #2
jhedstromCommitted to 7.x. Thanks again.