Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7.8
-
Fix Version/s: 1.9.3
-
Component/s: Zend_Service_Twitter
-
Labels:None
Description
I have 2 Zend_Service_Twitter objects, both with their own account credentials. After sending an update with one object, an update on the next object will use the wrong useraccount.
E.g.
$a = new Zend_Service_Twitter("userA", "passwordA");
$b = new Zend_Service_Twitter("userB", "passwordB");
$a->status->update("This is a test");
$b->status->update("This is a test too");
// result, both messages get posted in userA's timeline.
I investigated a bit further, and the problem probably is is that Zend_Service_Abstract, which Zend_Service_Twitter is indirectly derived from, uses a protected static $_httpClient member to handle rest calls. This is probably a design flaw, since this could lead to a number of problems where various different objects could inadvertently get unexpected results, since they share a single common http client object.