Skip to content

Commit 7f440c4

Browse files
author
Chris Park
committed
Merge branch 'develop'
2 parents cb7a115 + 22bedfe commit 7f440c4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ See the [wiki](https://github.com/rosette-api/php/wiki) for more information.
99
Installation
1010
------------
1111

12-
`composer require "rosette/api: ~1.0.1"`
12+
`composer require "rosette/api: ~1.0.*"`
1313

1414
Basic Usage
1515
-----------

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rosette/api",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Rosette API PHP client SDK",
55
"license": "Apache",
66
"keywords": [

source/rosette/api/Api.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ public function checkVersion($url, $versionToCheck = null)
345345
$resultObject = array_pop((array_slice($resultObject, -1)));
346346
$resultObject = (array) json_decode($resultObject);
347347

348-
if (key_exists('versionChecked', $resultObject) && $resultObject['versionChecked'] === true) {
348+
if (array_key_exists('versionChecked', $resultObject) && $resultObject['versionChecked'] === true) {
349349
$this->version_checked = true;
350350
} else {
351351
throw new RosetteException(
@@ -385,11 +385,11 @@ private function makeRequest($url, $headers, $data, $method)
385385
if ($this->useMultiPart === null) {
386386
$data = (array) $data;
387387

388-
if (key_exists('content', $data) && $data['content'] === "") {
388+
if (array_key_exists('content', $data) && $data['content'] === "") {
389389
unset($data['content']);
390390
}
391391

392-
if (key_exists('contentUri', $data) && $data['contentUri'] === "") {
392+
if (array_key_exists('contentUri', $data) && $data['contentUri'] === "") {
393393
unset($data['contentUri']);
394394
}
395395

@@ -430,7 +430,7 @@ private function makeRequest($url, $headers, $data, $method)
430430
$response = explode(PHP_EOL, $response);
431431
$this->setResponseCode($resCode);
432432

433-
if (count($response) > 8) {
433+
if (array_key_exists(9, $response)) {
434434
if (strlen($response[9]) > 3 && mb_strpos($response[9], "\x1f" . "\x8b" . "\x08", 0) === 0) {
435435
// a gzipped string starts with ID1(\x1f) ID2(\x8b) CM(\x08)
436436
// http://www.gzip.org/zlib/rfc-gzip.html#member-format

0 commit comments

Comments
 (0)