Fixed Utils::resolveTokenPath() with @variable@ not working properly

This commit is contained in:
Matias Griese
2022-03-31 21:32:28 +03:00
parent f4dd10a439
commit 20e7166eed
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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], '@'),