Skip to content

Commit ba5013f

Browse files
committed
Merge branch 'support/2.7'
2 parents 17794e7 + 03045fe commit ba5013f

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
codebird-php - changelog
22
========================
33

4+
2.7.1 (2015-08-16)
5+
+ #124 Download redirected remote images
6+
47
2.7.0 (2015-05-14)
58
- #92, #108 Fix issues with uploading special chars
69
+ #109 Proxy support

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codebird-php",
3-
"version": "2.7.0",
3+
"version": "2.7.1",
44
"homepage": "http://www.jublo.net/projects/codebird/php",
55
"authors": [
66
"Joshua Atkins <joshua.atkins@jublo.net>",

src/codebird.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* A Twitter library in PHP.
77
*
88
* @package codebird
9-
* @version 2.7.0
9+
* @version 2.7.1
1010
* @author Jublo Solutions <support@jublo.net>
1111
* @copyright 2010-2015 Jublo Solutions <support@jublo.net>
1212
* @license http://opensource.org/licenses/GPL-3.0 GNU General Public License 3.0
@@ -104,7 +104,7 @@ class Codebird
104104
/**
105105
* The current Codebird version
106106
*/
107-
protected $_version = '2.7.0';
107+
protected $_version = '2.7.1';
108108

109109
/**
110110
* Auto-detect cURL absence
@@ -716,7 +716,7 @@ protected function getCurlInitialization($url)
716716
protected function getNoCurlInitialization($url, $contextOptions, $hostname = '')
717717
{
718718
$httpOptions = array();
719-
719+
720720
$httpOptions['header'] = array(
721721
'User-Agent: codebird-php ' . $this->getVersion() . ' by Jublo Solutions <support@jublo.net>'
722722
);
@@ -1269,6 +1269,8 @@ protected function _buildMultipart($method, $params)
12691269
// use hardcoded download timeouts for now
12701270
curl_setopt($ch, _CURLOPT_TIMEOUT_MS, 5000);
12711271
curl_setopt($ch, _CURLOPT_CONNECTTIMEOUT_MS, 2000);
1272+
// find files that have been redirected
1273+
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
12721274
$result = curl_exec($ch);
12731275
if ($result !== false) {
12741276
$value = $result;

0 commit comments

Comments
 (0)