Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check array indicies are set before using #278

Merged
merged 5 commits into from Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/WordPress/ClientActions.php
Expand Up @@ -90,10 +90,10 @@ private function filterZones($response)

public function cacheDomainName($response)
{
// Check if domain name needs to cached
// Check if domain name needs to be cached
$wpDomain = $this->wordpressAPI->getOriginalDomain();
$cachedDomainList = $this->wordpressAPI->getDomainList();
$cachedDomain = $cachedDomainList[0];
$cachedDomain = isset($cachedDomainList[0]) ? $cachedDomainList[0] : '';

if (Utils::getRegistrableDomain($wpDomain) !== $cachedDomain) {
// If it's not a subdomain cache the current domain
Expand Down
2 changes: 1 addition & 1 deletion src/WordPress/Proxy.php
Expand Up @@ -59,7 +59,7 @@ public function run()

$response = null;
$body = $request->getBody();
$csrfToken = $body['cfCSRFToken'];
$csrfToken = isset($body['cfCSRFToken']) ? $body['cfCSRFToken'] : null;
if ($this->isCloudFlareCSRFTokenValid($request->getMethod(), $csrfToken)) {
$response = $this->requestRouter->route($request);
} else {
Expand Down