diff --git a/CHANGELOG b/CHANGELOG index 12d2439..57faa76 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ codebird-php - changelog ======================== +2.6.1 (2014-12-13) +- #90 Allow uploading media with special chars + 2.6.0 (2014-10-12) + #67 Don't require cURL, allow stream connections too + Use default timeout diff --git a/bower.json b/bower.json index 20c0b03..f543b74 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "codebird-php", - "version": "2.6.0", + "version": "2.6.1", "homepage": "http://www.jublo.net/projects/codebird/php", "authors": [ "Joshua Atkins ", diff --git a/src/codebird.php b/src/codebird.php index b31de70..e89df14 100644 --- a/src/codebird.php +++ b/src/codebird.php @@ -6,7 +6,7 @@ * A Twitter library in PHP. * * @package codebird - * @version 2.6.0 + * @version 2.6.1 * @author Jublo Solutions * @copyright 2010-2014 Jublo Solutions * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License 3.0 @@ -109,7 +109,7 @@ class Codebird /** * The current Codebird version */ - protected $_version = '2.6.0'; + protected $_version = '2.6.1'; /** * Auto-detect cURL absence @@ -1091,18 +1091,20 @@ protected function _buildMultipart($method, $params) // check for filenames if (in_array($key, $possible_files)) { + // the file system does not know about UTF-8 filenames + $filename_decoded = utf8_decode($value); if (// is it a file, a readable one? - @file_exists($value) - && @is_readable($value) + @file_exists($filename_decoded) + && @is_readable($filename_decoded) // is it a valid image? - && $data = @getimagesize($value) + && $data = @getimagesize($filename_decoded) ) { // is it a supported image format? if (in_array($data[2], $this->_supported_media_files)) { // try to read the file ob_start(); - readfile($value); + readfile($filename_decoded); $data = ob_get_contents(); ob_end_clean(); if (strlen($data) === 0) {