This repository was archived by the owner on Jan 15, 2025. It is now read-only.
File tree 2 files changed +13
-5
lines changed
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -254,13 +254,13 @@ public function buildOauth($url, $requestMethod)
254
254
*/
255
255
public function performRequest ($ return = true )
256
256
{
257
- if (!is_bool ($ return ))
258
- {
259
- throw new Exception ('performRequest parameter must be true or false ' );
257
+ if (!is_bool ($ return ))
258
+ {
259
+ throw new Exception ('performRequest parameter must be true or false ' );
260
260
}
261
261
262
262
$ header = array ($ this ->buildAuthorizationHeader ($ this ->oauth ), 'Expect: ' );
263
-
263
+
264
264
$ getfield = $ this ->getGetfield ();
265
265
$ postfields = $ this ->getPostfields ();
266
266
@@ -287,6 +287,14 @@ public function performRequest($return = true)
287
287
$ feed = curl_init ();
288
288
curl_setopt_array ($ feed , $ options );
289
289
$ json = curl_exec ($ feed );
290
+
291
+ if (($ error = curl_error ($ feed )) !== '' )
292
+ {
293
+ curl_close ($ feed );
294
+
295
+ throw new \Exception ($ error );
296
+ }
297
+
290
298
curl_close ($ feed );
291
299
292
300
return $ json ;
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ public function testStatusesHomeTimeline()
105
105
{
106
106
$ url = 'https://api.twitter.com/1.1/statuses/home_timeline.json ' ;
107
107
$ method = 'GET ' ;
108
- $ params = '?user_id=3232926711 ' ;
108
+ $ params = '?user_id=3232926711&max_id=595155660494471168 ' ;
109
109
110
110
$ data = $ this ->exchange ->request ($ url , $ method , $ params );
111
111
$ expected = "Test Tweet " ;
You can’t perform that action at this time.
0 commit comments