Skip to content

Commit

Permalink
Update Codebird to 2.6.1 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Rogerio committed Dec 29, 2014
1 parent b05cb72 commit 812ebba
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions codebird.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -109,7 +109,7 @@ class Codebird
/**
* The current Codebird version
*/
protected $_version = '2.6.0';
protected $_version = '2.6.1';

/**
* Auto-detect cURL absence
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -1563,4 +1565,4 @@ protected function _parseApiReply($reply)
}
}

?>
?>

0 comments on commit 812ebba

Please sign in to comment.