Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.9.7
-
Component/s: Zend_Gdata
-
Labels:None
Description
Zend Framework 1.9.6 (r19198).
Released on November 23, 2009.
Package Zend_Gdata > YouTube
File: Zend\Gdata\YouTube\VideoQuery.php
Bug: Line:143
//$temp = substr($temp, -1);
Fix: Line:143 Replace with...
$temp = substr($temp, 0, strlen($temp)-1);
—
Explaination:
http://code.google.com/apis/youtube/2.0/developers_guide_protocol_api_query_parameters.html
To exclude videos from the API response if those videos are associated with a descriptive address but not with specific geographic coordinates, append an exclamation point ("!") to the end of the parameter value. This practice effectively ensures that all videos in the API response can be plotted on a map.
The following examples show sample uses of this parameter:
location=37.42307,-122.08427&location-radius=100km
location=37.42307,-122.08427!&location-radius=100km
—
The variable $temp is to temporary remove the exclamation
so that the longitude can validate as numeric. However, substr($temp, -1); will return the substr
instead of the expected (-122.08427). To fix this, we simply need to change that to substr($temp, 0, strlen($temp)-1)
What is the problem? Can you specify the problem or bug with some lines of example code?