Skip to content

Commit

Permalink
Merge pull request #313 from pine3ree/ent-substitute
Browse files Browse the repository at this point in the history
ENT_SUBSTITUTE is defined since php 5.4
  • Loading branch information
ragboyjr authored Nov 2, 2024
2 parents fadf8aa + 90984a0 commit 8864ae5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Template/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public function escape($string, $functions = null)
static $flags;

if (!isset($flags)) {
$flags = ENT_QUOTES | (defined('ENT_SUBSTITUTE') ? ENT_SUBSTITUTE : 0);
$flags = ENT_QUOTES | ENT_SUBSTITUTE;
}

if ($functions) {
Expand Down

1 comment on commit 8864ae5

@pedrohsa92
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sugestão:

Linha 196
public function layout($name, array $data = array())
{
$this->layoutName = $name;
$this->layoutData = array_merge($this->data, $data);
}

Isso facilita a vida quando usamos o layout("template::site"); ?>

Se tivermos declarado algum $data quando usamos o render() no controlador, isso mescla o data e resolve. Ou faz merge, ou cria um outro método, por favor...

Please sign in to comment.