History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: ZF-2141
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Ryan Boyd
Reporter: Carsten Möhrke
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

Zend_Gdata_AuthSub::AuthSubRevokeToken() generates warning

Created: 03/Nov/07 10:55 AM   Updated: 26/Feb/08 12:56 PM
Component/s: Zend_Gdata
Affects Version/s: 1.0.2
Fix Version/s: 1.0.4

Time Tracking:
Not Specified

Issue Links:
Related
 

 Public Fields   Internal Project Management Fields   
Resolution Date: 04/Nov/07 09:45 AM
Fix Version Priority: Must Have


 Description  « Hide
Calling Zend_Gdata_AuthSub::AuthSubRevokeToken() results in a warning:

Notice: Undefined variable: source in /Zend/Gdata/AuthSub.php on line 153



 All   Comments   Work Log   Change History   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Ryan Boyd - 04/Nov/07 09:45 AM
Fixed by no longer referencing the undefined variable $source. Sending out request for code review to fw-gdata allow for this to be released with the next release.

Trevor Johns - 04/Nov/07 07:44 PM
Review for r6732:

I don't see anything wrong with the changes made. Feel free to merge this into release-1.0.

However, is there a reason that getHttpClient() isn't being called anywhere here? This looks like the sort of thing that could have easily been caught with a unit test.


Ryan Boyd - 04/Nov/07 09:09 PM
Thanks for the review Trevor.

Agreed that getHttpClient could be called to generate the header and avoid duplicate code (in this method and others). Filed as http://framework.zend.com/issues/browse/ZF-2145.

Yes, it could be caught in a unit test, if we used mock HTTP client classes, but we haven't used those yet for Zend_Gdata. Filed as:
http://framework.zend.com/issues/browse/ZF-2146


Trevor Johns - 05/Nov/07 01:43 AM
While mock HTTP clients would certainly be nice, in this case we just would have had to check that getHttpClient() is returning a properly instantiated instance of Zend_Http_Client.

Ryan Boyd - 05/Nov/07 08:24 AM
Gotcha, I thought you were mentioning that we needed testing on AuthSubRevokeToken(sic), which couldn't be tested fully without a mock client. Testing getHttpClient can be tested, and would have caught this problem (as you pointed out) if we were using getHttpClient in the other methods.

Thanks Trevor!
-Ryan