YouTube API module breaks admin/settings/search

lyricnz - June 29, 2008 - 12:06
Project:Youtube API
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The YouTube module has a function called

function youtube_api_search($term, $start_at = 1, $num_items = 10, $constraints = array())

however this collides with hook_search (which takes completely different parameters), meaning that the search admin page (which happens to call this hook) bombs out with a PHP/datatype error. See http://api.drupal.org/api/function/hook_search/5 for details.

Suggest renaming function to youtube_api_search_videos() or similar. This would be an API change, and should be called out in release notes. See attachment.

AttachmentSize
youtube_api.rename_search.patch672 bytes

#1

lyricnz - June 29, 2008 - 12:22
Status:active» patch (code needs review)

Needs review, I suppose :)

#2

beeradb - June 30, 2008 - 18:24
Status:patch (code needs review)» patch (reviewed & tested by the community)

Thanks for the bug report, as well as the patch.

I'll commit with the next round of work.

#3

beeradb - July 1, 2008 - 03:20

Fixed in http://drupal.org/cvs?commit=124629

thanks again.

#4

beeradb - July 2, 2008 - 17:07
Status:patch (reviewed & tested by the community)» closed
 
 

Drupal is a registered trademark of Dries Buytaert.