mirror of
https://github.com/getgrav/grav.git
synced 2026-02-04 22:00:13 +01:00
Fixed empty $grav['request']->getAttribute('route')->getExtension()
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
* Checkbox getting interpreted as string, so created new `Validation::filterCheckbox()`
|
||||
* Fixed backwards compatibility to `select` field with `selectize.create` set to true [git-sync#141](https://github.com/trilbymedia/grav-plugin-git-sync/issues/141)
|
||||
* Fixed `YamlFormatter::decode()` to always return array [#2494](https://github.com/getgrav/grav/pull/2494)
|
||||
* Fixed empty `$grav['request']->getAttribute('route')->getExtension()`
|
||||
|
||||
# v1.6.8
|
||||
## 04/23/2019
|
||||
|
||||
@@ -30,10 +30,13 @@ class RequestProcessor extends ProcessorBase
|
||||
$request = $request->withParsedBody(json_decode($request->getBody()->getContents(), true));
|
||||
}
|
||||
|
||||
$uri = $request->getUri();
|
||||
$ext = mb_strtolower(pathinfo($uri->getPath(), PATHINFO_EXTENSION));
|
||||
|
||||
$request = $request
|
||||
->withAttribute('grav', $this->container)
|
||||
->withAttribute('time', $_SERVER['REQUEST_TIME_FLOAT'] ?? GRAV_REQUEST_TIME)
|
||||
->withAttribute('route', Uri::getCurrentRoute())
|
||||
->withAttribute('route', Uri::getCurrentRoute()->withExtension($ext))
|
||||
->withAttribute('referrer', $this->container['uri']->referrer());
|
||||
|
||||
$event = new RequestHandlerEvent(['request' => $request, 'handler' => $handler]);
|
||||
|
||||
@@ -229,7 +229,6 @@ trait FlexMediaTrait
|
||||
}
|
||||
|
||||
// Remove Extra Files
|
||||
|
||||
foreach (scandir($targetPath, SCANDIR_SORT_NONE) as $file) {
|
||||
$preg_name = preg_quote($fileParts['filename'], '`');
|
||||
$preg_ext =preg_quote($fileParts['extension'], '`');
|
||||
|
||||
Reference in New Issue
Block a user