Skip to content

Commit

Permalink
Merge pull request naneau#24 from jamix2/master
Browse files Browse the repository at this point in the history
Fixing scrambler for static variable names
  • Loading branch information
naneau committed Dec 16, 2015
2 parents 15dc0f4 + 874bb97 commit a01fa43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Naneau/Obfuscator/Node/Visitor/ScrambleVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use PhpParser\Node;
use PhpParser\Node\Stmt;
use PhpParser\Node\Param;
use PhpParser\Node\Stmt\StaticVar;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Stmt\Catch_ as CatchStatement;
use PhpParser\Node\Expr\ClosureUse;
Expand Down Expand Up @@ -58,7 +59,7 @@ public function __construct(StringScrambler $scrambler)
public function enterNode(Node $node)
{
// Function param or variable use
if ($node instanceof Param || $node instanceof Variable) {
if ($node instanceof Param || $node instanceof StaticVar || $node instanceof Variable) {
return $this->scramble($node);
}

Expand Down

0 comments on commit a01fa43

Please sign in to comment.