ZF-1714: getUserPosts() defaults to retrieving zero posts if no count is specified


From the original thread on fw-general:

bq. Hey guys,

bq. I'm currently trying to figure out Zend_Service_Delicious. I really don't want to do anything complicated, just fetch a user's public posts. According to the manual, this should work nicely:


$feed = new Zend_Service_Delicious();
$posts = $feed->getUserPosts('mwolff');
foreach($posts as $item) {
    echo "
"; print_r($item); echo "\n
"; }

bq. After the call to getUserPosts(), $posts does contain a Zend_Service_Delicious_PostList object. The following iteration, however, yields no results whatsoever.

bq. This is with a checkout of trunk from Monday. What am I doing wrong? Am I doing anything wrong??

bq. Thanks, bq. Markus


Instead, the {{getUserPosts()}} method should default to a sane value, such as 10 or 15 or all posts (if supported by API).

When retrieving posts with getUserPosts() and no post count specified method returns 15 posts. This is default for web service.

Post count isn't a problem in this case, JSON component is to blame. As it seems JSON decoder method has some problems with char "»"(ascii 187). When running provided code returns a post that has a title "Jack Slocum\'s Blog » Preview: Drag and Drop enhancements and the new TreePanel" on which JSON decoder fails.

I have created a new issue (ZF-1735) for this problem with JSON component.

The problem is now fixed in SVN. Delicious component now forces use of Zend_Json_Decoder and bypasses use of JSON pecl extension (if it exists) which has some problems with feeds.

Updating fixed version to 1.1.0 since the change has not yet been merged to the 1.0.x release branch.

Changes have been merged to release-1.0 from the trunk, so changing fix version respectively.

Updating Fix Version to follow issue tracker conventions.