Skip to content

Commit

Permalink
Merge pull request #27 from winzou/hotfix
Browse files Browse the repository at this point in the history
Skip expression parsing on non-string arguments
  • Loading branch information
winzou authored Nov 3, 2016
2 parents fdba189 + e2a8102 commit 4ef48e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SM/Callback/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public function call(TransitionEvent $event)
$expr = new ExpressionLanguage();
$args = array_map(
function($arg) use($expr, $event) {
if (!is_string($arg)) {
return $arg;
}

return $expr->evaluate($arg, array(
'object' => $event->getStateMachine()->getObject(),
'event' => $event
Expand Down

0 comments on commit 4ef48e7

Please sign in to comment.