Skip to content

Commit

Permalink
ensure the '==' does the correct operation when the values to be comp…
Browse files Browse the repository at this point in the history
…ared are different (for example, string and integer)
  • Loading branch information
manuel-rubio committed Mar 16, 2016
1 parent 3455387 commit 5c99584
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ephp_context.erl
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ resolve_op(#operation{type=Type, expression_left=Op1, expression_right=Op2,
is_record(OpRes1, reg_instance) andalso
is_record(OpRes2, reg_instance) ->
get_class_name(OpRes1) =:= get_class_name(OpRes2);
<<"==">> -> OpRes1 == OpRes2;
<<"==">> -> ephp_util:to_bin(OpRes1) == ephp_util:to_bin(OpRes2);
<<"===">> -> OpRes1 =:= OpRes2;
<<"!=">> -> OpRes1 /= OpRes2;
<<"!==">> -> OpRes1 =/= OpRes2;
Expand Down

0 comments on commit 5c99584

Please sign in to comment.