Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Park committed Mar 30, 2016
2 parents cb7a115 + 22bedfe commit 7f440c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ See the [wiki](https://github.com/rosette-api/php/wiki) for more information.
Installation
------------

`composer require "rosette/api: ~1.0.1"`
`composer require "rosette/api: ~1.0.*"`

Basic Usage
-----------
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rosette/api",
"version": "1.0.1",
"version": "1.0.2",
"description": "Rosette API PHP client SDK",
"license": "Apache",
"keywords": [
Expand Down
8 changes: 4 additions & 4 deletions source/rosette/api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public function checkVersion($url, $versionToCheck = null)
$resultObject = array_pop((array_slice($resultObject, -1)));
$resultObject = (array) json_decode($resultObject);

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

if (key_exists('content', $data) && $data['content'] === "") {
if (array_key_exists('content', $data) && $data['content'] === "") {
unset($data['content']);
}

if (key_exists('contentUri', $data) && $data['contentUri'] === "") {
if (array_key_exists('contentUri', $data) && $data['contentUri'] === "") {
unset($data['contentUri']);
}

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

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

0 comments on commit 7f440c4

Please sign in to comment.