Skip to content

Commit

Permalink
Merge pull request #2467 from kevinhatry/2.0.0
Browse files Browse the repository at this point in the history
fix inverted test in Model/setSnapshotData() (issue #2466)
  • Loading branch information
Phalcon committed May 26, 2014
2 parents d6dbd72 + 4cada75 commit 2ca69b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ext/phalcon/mvc/model.c
Original file line number Diff line number Diff line change
Expand Up @@ -4615,7 +4615,7 @@ PHP_METHOD(Phalcon_Mvc_Model, setSnapshotData) {
}


if (Z_TYPE_P(data) == IS_ARRAY) {
if (Z_TYPE_P(data) != IS_ARRAY) {
ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The snapshot data must be an array", "phalcon/mvc/model.zep", 3617);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion phalcon/mvc/model.zep
Original file line number Diff line number Diff line change
Expand Up @@ -3613,7 +3613,7 @@ abstract class Model implements ModelInterface, ResultInterface, InjectionAwareI
{
var key, value, snapshot, attribute;

if typeof data == "array" {
if typeof data != "array" {
throw new Exception("The snapshot data must be an array");
}

Expand Down

0 comments on commit 2ca69b4

Please sign in to comment.