File tree 4 files changed +12
-4
lines changed
4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Please note that this documentation contains the latest changes that may as of y
47
47
48
48
## Installation
49
49
There are various ways to install and use this sdk. We'll elaborate on a couple here.
50
- Note that the Parse PHP SDK requires PHP 5.4 or newer.
50
+ Note that the Parse PHP SDK requires PHP 5.4 or newer. It can also run on HHVM (recommended 3.0 or newer).
51
51
52
52
### Install with Composer
53
53
Original file line number Diff line number Diff line change 20
20
"license" : " SEE LICENSE IN LICENSE" ,
21
21
"homepage" : " https://github.com/montymxb/parse-server-test#readme" ,
22
22
"dependencies" : {
23
- "parse-server-test" : " 1.3.4 "
23
+ "parse-server-test" : " 1.3.5 "
24
24
}
25
25
}
Original file line number Diff line number Diff line change @@ -252,7 +252,10 @@ private function download()
252
252
if ($ httpStatus > 399 ) {
253
253
throw new ParseException ('Download failed, file may have been deleted. ' , $ httpStatus );
254
254
}
255
- $ this ->mimeType = $ httpClient ->getResponseContentType ();
255
+ $ mimeType = $ httpClient ->getResponseContentType ();
256
+ if (isset ($ mimeType ) && $ mimeType !== 'null ' ) {
257
+ $ this ->mimeType = $ mimeType ;
258
+ }
256
259
$ this ->data = $ response ;
257
260
258
261
return $ response ;
Original file line number Diff line number Diff line change @@ -146,7 +146,12 @@ public function testParseFileTypes()
146
146
$ this ->assertEquals ($ contents , $ file3Again ->getData ());
147
147
148
148
// check mime types after calling getData
149
- $ this ->assertEquals ('application/octet-stream ' , $ fileAgain ->getMimeType ());
149
+ $ mt = $ fileAgain ->getMimeType ();
150
+ // both of the following are acceptable for a response from a submitted mime type of unknown/unknown
151
+ $ this ->assertTrue (
152
+ $ mt === 'application/octet-stream ' || // parse-server < 2.7.0
153
+ $ mt === 'unknown/unknown ' // parse-server >= 2.7.0, unknown mime type response change
154
+ );
150
155
$ this ->assertEquals ('image/png ' , $ file2Again ->getMimeType ());
151
156
$ this ->assertEquals ('image/png ' , $ file3Again ->getMimeType ());
152
157
}
You can’t perform that action at this time.
0 commit comments