10000 Finish 148-undefined-index-patch · adamwiw/codebird-php@87043b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 87043b1

Browse files
committed
Finish 148-undefined-index-patch
Fix jublo#147.
2 parents c904bc0 + 89b01fc commit 87043b1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ codebird-php - changelog
1616
+ Support WebP media format
1717
+ Fixes for non-multipart media uploads, see #141
1818
+ Return rate-limiting info as object, when return format = object
19+
- #147 Undefined index when checking for possible media files
1920

2021
2.7.2 (2015-09-23)
2122
- #135 Invalid HTTP request headers in non-cURL mode

src/codebird.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1700,7 +1700,9 @@ protected function _getMultipartRequestFromParams($method_template, $border, $pa
17001700
* @return mixed
17011701
*/
17021702
protected function _checkForFiles($method_template, $key, $value) {
1703-
if (!in_array($key, self::$_possible_files[$method_template])) {
1703+
if (!array_key_exists($method_template, self::$_possible_files)
1704+
|| !in_array($key, self::$_possible_files[$method_template])
1705+
) {
17041706
return false;
17051707
}
17061708
$data = $this->_buildBinaryBody($value);

0 commit comments

Comments
 (0)
0