Skip to content

Commit

Permalink
Fix dash in pushonce
Browse files Browse the repository at this point in the history
  • Loading branch information
ovanschie committed Mar 26, 2018
1 parent 423235e commit 4742407
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/directives.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
'pushonce' => function ($expression) {
list($pushName, $pushSub) = explode(':', trim(substr($expression, 1, -1)));

$key = '__pushonce_'.$pushName.'_'.str_replace('-', '_', $pushSub);
$key = '__pushonce_'.str_replace('-', '_', $pushName).'_'.str_replace('-', '_', $pushSub);

return "<?php if(! isset(\$__env->{$key})): \$__env->{$key} = 1; \$__env->startPush('{$pushName}'); ?>";
},
Expand Down

0 comments on commit 4742407

Please sign in to comment.