Skip to content

Commit

Permalink
Merge pull request #113 from imsaintx/patch-1
Browse files Browse the repository at this point in the history
code styling fixed
  • Loading branch information
rmccue committed Apr 23, 2014
2 parents dab8807 + a13fbdc commit c86bc71
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions library/Requests/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ public function __construct($url = null, $headers = array(), $data = array(), $o
* @return mixed|null Property value, null if none found
*/
public function __get($key) {
if (isset($this->options[$key]))
if (isset($this->options[$key])) {
return $this->options[$key];
}

return null;
}
Expand Down Expand Up @@ -112,7 +113,9 @@ public function __isset($key) {
* @param string $key Property key
*/
public function __unset($key) {
$this->options[$key] = null;
if (isset($this->options[$key])) {
unset($this->options[$key]);
}
}

/**#@+
Expand Down Expand Up @@ -236,6 +239,7 @@ protected function merge_request($request, $merge_options = true) {
$request['url'] = Requests_IRI::absolutize($this->url, $request['url']);
$request['url'] = $request['url']->uri;
}

$request['headers'] = array_merge($this->headers, $request['headers']);

if (is_array($request['data']) && is_array($this->data)) {
Expand All @@ -248,6 +252,7 @@ protected function merge_request($request, $merge_options = true) {
// Disallow forcing the type, as that's a per request setting
unset($request['options']['type']);
}

return $request;
}
}
}

0 comments on commit c86bc71

Please sign in to comment.