8000 Finish 2.6.1 · moiAK/codebird-php@4cfdc7b · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit 4cfdc7b

Browse files
committed
Finish 2.6.1
Conflicts: CHANGELOG src/codebird.php
2 parents 34a23d4 + 61115a6 commit 4cfdc7b

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

CHANGELOG

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
codebird-php - changelog
22
========================
33

4-
2.6.1 (not yet released)
4+
3.0.0-dev (not yet released)
5+
6+
2.6.1 (2014-12-13)
7+
- #90 Allow uploading media with special chars
58

69
2.6.0 (2014-10-12)
710
+ #67 Don't require cURL, allow stream connections too

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.6.0",
3+
"version": "2.6.1",
44
"homepage": "http://www.jublo.net/projects/codebird/php",
55
"authors": [
66
"Joshua Atkins <joshua.atkins@jublo.net>",

src/codebird.php

Lines changed: 8 additions & 6 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.6.1-dev
9+
* @version 3.0.0-dev
1010
* @author Jublo Solutions <support@jublo.net>
1111
* @copyright 2010-2014 Jublo Solutions <support@jublo.net>
1212
* @license http://opensource.org/licenses/GPL-3.0 GNU General Public License 3.0
@@ -109,7 +109,7 @@ class Codebird
109109
/**
110110
* The current Codebird version
111111
*/
112-
protected $_version = '2.6.1-dev';
112+
protected $_version = '3.0.0-dev';
113113

114114
/**
115115
* Auto-detect cURL absence
@@ -1091,18 +1091,20 @@ protected function _buildMultipart($method, $params)
10911091

10921092
// check for filenames
10931093
if (in_array($key, $possible_files)) {
1094+
// the file system does not know about UTF-8 filenames
1095+
$filename_decoded = utf8_decode($value);
10941096
if (// is it a file, a readable one?
1095-
@file_exists($value)
1096-
&& @is_readable($value)
1097+
@file_exists($filename_decoded)
1098+
&& @is_readable($filename_decoded)
10971099

10981100
// is it a valid image?
1099-
&& $data = @getimagesize($value)
1101+
&& $data = @getimagesize($filename_decoded)
11001102
) {
11011103
// is it a supported image format?
11021104
if (in_array($data[2], $this->_supported_media_files)) {
11031105
// try to read the file
11041106
ob_start();
1105-
readfile($value);
1107+
readfile($filename_decoded);
11061108
$data = ob_get_contents();
11071109
ob_end_clean();
11081110
if (strlen($data) === 0) {

0 commit comments

Comments
 (0)
0