function stripText($text) {
$text = strtolower(trim($text));
// strip all whitespace
$clean = preg_replace('/(\s\s+|\t|\n)/', '', $text);
return $clean;
}
to strip out any whitespaces before sending the string to Zend, it will still throw an error when it does not find the name, but at least the Exception is catchable and won't stop your script dead in its tracks. I'll see if I can submit a fix to Zend so at least they can throw an exception when the username contains whitespaces, or better yet handle it correctly in the first place.
On Tuesday, June 5, 2012 9:03:01 AM UTC-4, Gonzo wrote:
I found out, that if your youtube Accountname contains a whitespace ---
the retrieving of any video from this accoutn/channel will fail, due
to invald uri - exception in URI/Http.php
The Solution for me was - rename my youtube account - kill the
whitespaces - and it works :)
Greez
Gonzo
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/N0dzuLSehJUJ.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment