Skip to content

Commit 1d35cf3

Browse files
Merge pull request #7 from QmarXX/patch-for-php53
Replace [] with array() for php 5.3 compatibility
2 parents 76c64a0 + 84966ec commit 1d35cf3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/FreshMail/RestApi.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class RestApi
4343
/**
4444
* @var array
4545
*/
46-
private $errors = [];
46+
private $errors = array();
4747

4848
/**
4949
* Get errors.
@@ -131,7 +131,7 @@ public function setContentType($contentType)
131131
return $this;
132132
}
133133

134-
public function doRequest($strUrl, $arrParams = [], $returnRawResponse = false)
134+
public function doRequest($strUrl, $arrParams = array(), $returnRawResponse = false)
135135
{
136136
if (empty($arrParams)) {
137137
$strPostData = '';
@@ -143,7 +143,7 @@ public function doRequest($strUrl, $arrParams = [], $returnRawResponse = false)
143143

144144
$apiSignature = sha1($this->strApiKey . '/' . self::PREFIX . $strUrl . $strPostData . $this->strApiSecret);
145145

146-
$headers = [];
146+
$headers = array();
147147
$headers[] = 'X-Rest-ApiKey: ' . $this->strApiKey;
148148
$headers[] = 'X-Rest-ApiSign: ' . $apiSignature;
149149

@@ -199,9 +199,9 @@ private function getResponseFromHeaders($cUrl)
199199
preg_match('/filename\=\"([a-zA-Z0-9\.]+)\"/', $headers, $fileName);
200200
file_put_contents(self::DEFAULT_FILE_PATH . $fileName[1], substr($this->rawResponse, $headerSize));
201201

202-
$this->response = [
202+
$this->response = array(
203203
'path' => self::DEFAULT_FILE_PATH . $fileName[1]
204-
];
204+
);
205205
} else {
206206
$this->response = json_decode(substr($this->rawResponse, $headerSize), true);
207207
}

0 commit comments

Comments
 (0)