-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pedro Rogerio
committed
Dec 29, 2014
1 parent
b05cb72
commit 812ebba
Showing
1 changed file
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* A Twitter library in PHP. | ||
* | ||
* @package codebird | ||
* @version 2.6.0 | ||
* @version 2.6.1 | ||
* @author Jublo Solutions <[email protected]> | ||
* @copyright 2010-2014 Jublo Solutions <[email protected]> | ||
* @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) { | ||
|
@@ -1563,4 +1565,4 @@ protected function _parseApiReply($reply) | |
} | ||
} | ||
|
||
?> | ||
?> |