File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -1068,27 +1068,19 @@ protected function _buildMultipart($method, $params)
1068
1068
1069
1069
// is it a valid image?
1070
1070
&& $ data = @getimagesize ($ value )
1071
+ // is it a supported image format?
1072
+ && in_array ($ data [2 ], $ this ->_supported_media_files )
1071
1073
) {
1072
- if (// is it a supported image format?
1073
- in_array ($ data [2 ], $ this ->_supported_media_files )
1074
- ) {
1075
- // try to read the file
1076
- ob_start ();
1077
- readfile ($ value );
1078
- $ data = ob_get_contents ();
1079
- ob_end_clean ();
1080
- if (strlen ($ data ) === 0 ) {
1081
- continue ;
1082
- }
1083
- $ value = $ data ;
1074
+ // try to read the file
1075
+ ob_start ();
1076
+ readfile ($ value );
1077
+ $ data = ob_get_contents ();
1078
+ ob_end_clean ();
1079
+ if (strlen ($ data ) === 0 ) {
1080
+ continue ;
1084
1081
}
1082
+ $ value = $ data ;
1085
1083
}
1086
-
1087
- /*
1088
- $multipart_request .=
1089
- "\r\nContent-Transfer-Encoding: base64";
1090
- $value = base64_encode($value);
1091
- */
1092
1084
}
1093
1085
1094
1086
$ multipart_request .=
You can’t perform that action at this time.
0 commit comments