Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c423f16

Browse files
Benjamin Benderfabpot
Benjamin Bender
authored andcommitted
[2.1][TwigBridge] Fixes Issue #7342 in TwigBridge
1 parent d77b97c commit c423f16

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/Symfony/Bridge/Twig/NodeVisitor/Scope.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Scope
3232
*/
3333
public function __construct(Scope $parent = null)
3434
{
35+
$this->data = array();
3536
$this->parent = $parent;
3637
$this->left = false;
3738
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace Symfony\Bridge\Twig\Tests\NodeVisitor;
4+
5+
use Symfony\Bridge\Twig\NodeVisitor\Scope;
6+
use Symfony\Bridge\Twig\Tests\TestCase;
7+
8+
class ScopeTest extends TestCase
9+
{
10+
public function testScopeInitiation()
11+
{
12+
$scope = new Scope();
13+
$scope->enter();
14+
$this->assertNull($scope->get('test'));
15+
}
16+
}

0 commit comments

Comments
 (0)