ZF-8720: Bug fix for setLocation with exclamation mark
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/… 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)