Skip to content

Commit a01fa43

Browse files
committed
Merge pull request naneau#24 from jamix2/master
Fixing scrambler for static variable names
2 parents 15dc0f4 + 874bb97 commit a01fa43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Naneau/Obfuscator/Node/Visitor/ScrambleVariable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use PhpParser\Node;
1717
use PhpParser\Node\Stmt;
1818
use PhpParser\Node\Param;
19+
use PhpParser\Node\Stmt\StaticVar;
1920
use PhpParser\Node\Expr\Variable;
2021
use PhpParser\Node\Stmt\Catch_ as CatchStatement;
2122
use PhpParser\Node\Expr\ClosureUse;
@@ -58,7 +59,7 @@ public function __construct(StringScrambler $scrambler)
5859
public function enterNode(Node $node)
5960
{
6061
// Function param or variable use
61-
if ($node instanceof Param || $node instanceof Variable) {
62+
if ($node instanceof Param || $node instanceof StaticVar || $node instanceof Variable) {
6263
return $this->scramble($node);
6364
}
6465

0 commit comments

Comments
 (0)