Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Event/ProxyEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public function __construct($data = array()){
$this->data = $data;
}

#[\ReturnTypeWillChange]
public function offsetSet($offset, $value){

if(is_null($offset)) {
Expand All @@ -18,14 +19,17 @@ public function offsetSet($offset, $value){
}
}

#[\ReturnTypeWillChange]
public function offsetExists($offset){
return isset($this->data[$offset]);
}

#[\ReturnTypeWillChange]
public function offsetUnset($offset){
unset($this->data[$offset]);
}

#[\ReturnTypeWillChange]
public function offsetGet($offset){
return isset($this->data[$offset]) ? $this->data[$offset] : null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/AbstractPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final public function subscribe($dispatcher){
}

// dispatch based on filter
final private function route($event_name, ProxyEvent $event){
private function route($event_name, ProxyEvent $event){
$url = $event['request']->getUri();

// url filter provided and current request url does not match it
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/CookiePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function onBeforeRequest(ProxyEvent $event){

// does this cookie belong to this domain?
// sometimes domain begins with a DOT indicating all subdomains - deprecated but still in use on some servers...
if(strpos($host, $cookie_domain) !== false){
if(!empty($host) && strpos($host, $cookie_domain) !== false){
$send_cookies[] = $cookie_name.'='.$cookie_value;
}
}
Expand Down