Issues

ZF-5664: getTotalResults return object, not integer

Issue Type: Bug Created: 2009-01-31T16:50:07.000+0000 Last Updated: 2009-04-02T16:37:34.000+0000 Status: Resolved Fix version(s): - 1.8.1 (12/May/09)

Reporter: Philip Kimmey (philipk) Assignee: Trevor Johns (tjohns) Tags: - Zend_Gdata

Related issues: Attachments:

Description

On a Gdata feed getTotalResults returns an object not an integer as the documentation suggests.

It is possible I am making an error of some sort, but this seems to be a pretty big problem.

Example code is as follows:

$resultsNum = $feed->getTotalResults(); echo gettype($resultNum);

This returns "object" rather than the expected "integer"

Thanks.

Comments

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-02-21T02:46:53.000+0000

I correct the component from Zend_Feed to Zend_Gdata and auto re-assign.

Because Zend_Gdata_Feed has this issue , not in Zend_Feed.

Posted by Trevor Johns (tjohns) on 2009-02-23T13:45:00.000+0000

This is a documentation bug. getTotalResults() is used to return the openSearch:totalResults element.

The code you want to use:

$resultsNumObj = $feed->getTotalResults(); $resultsNum = $resultsNumObj->getText(); echo gettype($resultNum);

I'll update the documentation...

Posted by Trevor Johns (tjohns) on 2009-02-23T13:53:01.000+0000

Patch sent to [~jhartmann] for review:

http://codereview.appspot.com/20052

Posted by Trevor Johns (tjohns) on 2009-02-26T17:11:45.000+0000

Since this is just a doc issue, I'm lowering the priority to trivial.

Posted by Trevor Johns (tjohns) on 2009-04-02T16:37:32.000+0000

Committed to trunk as r14614. Committed to release-1.7 as r14615. Marking as fixed for next mini release.

<pre class="literal">
commit 359584d5b5858bc836b5c5f5bdfc6c326a51644c
Author: tjohns 
Date:   Thu Apr 2 23:28:37 2009 +0000

    ZF-5664: Update Zend_Gdata_Feed documentation to indicate proper
    argument/return-value types on OpenSearch setters and getters.
    
    Review URL: <a href="http://codereview.appspot.com/20052">http://codereview.appspot.com/20052</a>
    
    git-svn-id: <a href="http://framework.zend.com/svn/framework/standard/trunk@14614">http://framework.zend.com/svn/framework/…</a> 44c647ce-9c0f-0410-b52a-842ac1e357ba

commit a14fbc2302f7afab486e2acb3761668299fe9498
Author: tjohns 
Date:   Thu Apr 2 23:33:39 2009 +0000

    Merge r14614 from trunk to release-1.7.
    
    ZF-5664: Update Zend_Gdata_Feed documentation to indicate proper
    argument/return-value types on OpenSearch setters and getters.
    
    Review URL: <a href="http://codereview.appspot.com/20052">http://codereview.appspot.com/20052</a>
    
    git-svn-id: <a href="http://framework.zend.com/svn/framework/standard/branches/release-1.7@14615">http://framework.zend.com/svn/framework/…</a> 44c647ce-9c0f-0410-b52a-842ac1e357ba

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts