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

Skip to content

Commit 8f2c875

Browse files
committed
merged branch benbender/2.1 (PR #7344)
This PR was squashed before being merged into the 2.1 branch (closes #7344). Commits ------- c423f16 [2.1][TwigBridge] Fixes Issue #7342 in TwigBridge Discussion ---------- [2.1][TwigBridge] Fixes Issue #7342 in TwigBridge | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #7342 | License | MIT | Doc PR | -- --------------------------------------------------------------------------- by stof at 2013-03-12T13:28:15Z Can you add a test to avoid regressions ? --------------------------------------------------------------------------- by benbender at 2013-03-12T13:54:02Z Done --------------------------------------------------------------------------- by stevelacey at 2013-03-12T14:40:59Z Looks good to me? --------------------------------------------------------------------------- by pborreli at 2013-03-12T16:04:27Z :+1:
2 parents 940d591 + c423f16 commit 8f2c875

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
$this->data = array();
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)