Skip to content

Commit

Permalink
Merge pull request naneau#8 from pirackr/master
Browse files Browse the repository at this point in the history
Fixing scramler for variable variable name
  • Loading branch information
naneau committed Jan 24, 2015
2 parents 536ef16 + 46824ea commit 27af06d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Naneau/Obfuscator/Node/Visitor/Scrambler.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ protected function scramble(Node $node, $var = 'name')
// String/value to scramble
$toScramble = $node->$var;

// We ignore to scramble if it's not string (ex: a variable variable name)
if (!is_string($toScramble)) {
return;
}

// Make sure there's something to scramble
if (strlen($toScramble) === 0) {
throw new InvalidArgumentException(sprintf(
Expand Down

0 comments on commit 27af06d

Please sign in to comment.