Zend Framework

Bug fix for setLocation with exclamation mark

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Trivial 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)

Activity

Hide
Marco Kaiser added a comment -

What is the problem? Can you specify the problem or bug with some lines of example code?

Show
Marco Kaiser added a comment - What is the problem? Can you specify the problem or bug with some lines of example code?
Hide
Marco Kaiser added a comment -

fixed with r20097

Show
Marco Kaiser added a comment - fixed with r20097
Hide
Trevor Johns added a comment - - edited

Marco,
Thanks for quickly fixing this.

However, I don't see a commit into a release branch. Are you sure this is fixed for the next mini release?

Show
Trevor Johns added a comment - - edited Marco, Thanks for quickly fixing this. However, I don't see a commit into a release branch. Are you sure this is fixed for the next mini release?
Hide
Marco Kaiser added a comment -

Yes i'm sure because i commited all to the right branch.
I looks like the Fisheye is a bit out of sync.

Show
Marco Kaiser added a comment - Yes i'm sure because i commited all to the right branch. I looks like the Fisheye is a bit out of sync.
Hide
Trevor Johns added a comment -

Oh Fisheye. Always causing trouble.

Thanks again!

Show
Trevor Johns added a comment - Oh Fisheye. Always causing trouble. Thanks again!

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: