Skip to content

Commit

Permalink
Fix #2375 Add check messages is object in Phalcon\Validation::appendM…
Browse files Browse the repository at this point in the history
…essage
  • Loading branch information
dreamsxin committed Apr 23, 2014
1 parent 6f614d3 commit db40376
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,9 @@ PHP_METHOD(Phalcon_Validation, appendMessage){
phalcon_fetch_params(1, 1, 0, &message);

messages = phalcon_fetch_nproperty_this(this_ptr, SL("_messages"), PH_NOISY TSRMLS_CC);
PHALCON_CALL_METHOD(NULL, messages, "appendmessage", message);
if (Z_TYPE_P(messages) == IS_OBJECT) {
PHALCON_CALL_METHOD(NULL, messages, "appendmessage", message);
}
RETURN_THIS();
}

Expand Down

0 comments on commit db40376

Please sign in to comment.