Skip to content

Commit

Permalink
Merge branch '2.6' into 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jun 8, 2022
2 parents 533aeb0 + 5f5e409 commit 1bf1012
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Controllers/ShareDraftController.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ private function getRenderedPageByURL(string $url): HTTPResponse
$variables = HTTPRequestBuilder::cleanEnvironment(Environment::getVariables());
$variables['_SERVER']['REQUEST_URI'] = $url;
$variables['_SERVER']['REQUEST_METHOD'] = 'GET';
$variables['_SERVER']['HTTP_USER_AGENT'] = 'CLI';
$variables['_SERVER']['HTTP_USER_AGENT'] =
isset($variables['_SERVER']['HTTP_USER_AGENT']) &&
$variables['_SERVER']['HTTP_USER_AGENT']
? $variables['_SERVER']['HTTP_USER_AGENT']
: 'CLI';

Environment::setVariables($variables);

Expand Down

0 comments on commit 1bf1012

Please sign in to comment.