Skip to content

Commit 27af06d

Browse files
committed
Merge pull request naneau#8 from pirackr/master
Fixing scramler for variable variable name
2 parents 536ef16 + 46824ea commit 27af06d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ protected function scramble(Node $node, $var = 'name')
6363
// String/value to scramble
6464
$toScramble = $node->$var;
6565

66+
// We ignore to scramble if it's not string (ex: a variable variable name)
67+
if (!is_string($toScramble)) {
68+
return;
69+
}
70+
6671
// Make sure there's something to scramble
6772
if (strlen($toScramble) === 0) {
6873
throw new InvalidArgumentException(sprintf(

0 commit comments

Comments
 (0)