Update Dirk.php
For a constant as an array key.
This commit is contained in:
parent
410879c522
commit
6f0ea1264d
1 changed files with 1 additions and 1 deletions
2
vendor/artoodetoo/dirk/src/Dirk.php
vendored
2
vendor/artoodetoo/dirk/src/Dirk.php
vendored
|
@ -174,7 +174,7 @@ class Dirk extends PhpEngine
|
|||
*/
|
||||
protected function compileIf(string $expression): string
|
||||
{
|
||||
if (\preg_match('%^\(\s*(\!\s*)?(\$[\w>-]+\[(?:[\'"]\w+[\'"]|\d+)\])\s*\)$%', $expression, $matches)) {
|
||||
if (\preg_match('%^\(\s*(\!\s*)?(\$[\w>-]+\[(?:\w+|[\'"]\w+[\'"])\])\s*\)$%', $expression, $matches)) {
|
||||
if (empty($matches[1])) {
|
||||
return "<?php if (! empty{$expression}): ?>";
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue