mirror of
https://github.com/getgrav/grav.git
synced 2026-08-31 04:35:54 +02:00
Fixed Utils::resolveTokenPath() with @variable@ not working properly
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* By default, add media to only pages which have been initialized in pages loop
|
||||
3. [](#bugfix)
|
||||
* Fixed locking and reading files using `Framework\File` classes
|
||||
* Fixed `Utils::resolveTokenPath()` with `@variable@` not working properly
|
||||
|
||||
# v1.7.33
|
||||
## mm/dd/2022
|
||||
|
||||
@@ -1720,7 +1720,7 @@ abstract class Utils
|
||||
protected static function resolveTokenPath(string $path): ?array
|
||||
{
|
||||
if (strpos($path, '@') !== false) {
|
||||
$regex = '/^(@\w+|\w+@|@\w+@)([^:]*)(.*)$/u';
|
||||
$regex = '/^(@\w+@|@\w+|\w+@)([^:]*)(.*)$/u';
|
||||
if (preg_match($regex, $path, $matches)) {
|
||||
return [
|
||||
trim($matches[1], '@'),
|
||||
|
||||
Reference in New Issue
Block a user