Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.2.4] Fix bugs found by static code analyzers #1393

Merged
merged 22 commits into from Oct 19, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Regenerated build/ files
  • Loading branch information
sjinks committed Oct 18, 2013
commit 5e27ed25146114d58447c943114867b155962828
25 changes: 8 additions & 17 deletions build/32bits/phalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -35389,12 +35389,8 @@ static PHP_METHOD(Phalcon_Validation, validate){
}

phalcon_update_property_this_quick(this_ptr, SL("_messages"), messages, 743366684UL TSRMLS_CC);
if (Z_TYPE_P(data) == IS_ARRAY) {
if (Z_TYPE_P(data) == IS_ARRAY || Z_TYPE_P(data) == IS_OBJECT) {
phalcon_update_property_this_quick(this_ptr, SL("_data"), data, 3972126110UL TSRMLS_CC);
} else {
if (Z_TYPE_P(data) == IS_OBJECT) {
phalcon_update_property_this_quick(this_ptr, SL("_data"), data, 3972126110UL TSRMLS_CC);
}
}

PHALCON_INIT_VAR(cancel_on_fail);
Expand Down Expand Up @@ -35582,18 +35578,14 @@ static PHP_METHOD(Phalcon_Validation, getValue){
if (phalcon_method_exists(entity, method TSRMLS_CC) == SUCCESS) {
PHALCON_INIT_VAR(value);
phalcon_call_method_zval(value, entity, method);
} else if (phalcon_method_quick_exists_ex(entity, SS("readattribute"), 95450773UL TSRMLS_CC) == SUCCESS) {
PHALCON_INIT_VAR(value);
phalcon_call_method_p1_key(value, entity, "readattribute", attribute, 95450773UL);
} else if (phalcon_isset_property_zval(entity, attribute TSRMLS_CC)) {
PHALCON_OBS_VAR(value);
phalcon_read_property_zval(&value, entity, attribute, PH_NOISY_CC);
} else {
if (phalcon_method_quick_exists_ex(entity, SS("readattribute"), 95450773UL TSRMLS_CC) == SUCCESS) {
PHALCON_INIT_NVAR(value);
phalcon_call_method_key(value, entity, "readattribute", 95450773UL);
} else {
if (phalcon_isset_property_zval(entity, attribute TSRMLS_CC)) {
PHALCON_OBS_NVAR(value);
phalcon_read_property_zval(&value, entity, attribute, PH_NOISY_CC);
} else {
PHALCON_INIT_NVAR(value);
}
}
PHALCON_INIT_VAR(value);
}

RETURN_CCTOR(value);
Expand Down Expand Up @@ -35684,7 +35676,6 @@ static PHP_METHOD(Phalcon_Validation, getValue){




#ifdef HAVE_CONFIG_H
#endif

Expand Down
25 changes: 8 additions & 17 deletions build/64bits/phalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -35389,12 +35389,8 @@ static PHP_METHOD(Phalcon_Validation, validate){
}

phalcon_update_property_this_quick(this_ptr, SL("_messages"), messages, 8245993366866550812UL TSRMLS_CC);
if (Z_TYPE_P(data) == IS_ARRAY) {
if (Z_TYPE_P(data) == IS_ARRAY || Z_TYPE_P(data) == IS_OBJECT) {
phalcon_update_property_this_quick(this_ptr, SL("_data"), data, 6953229211038UL TSRMLS_CC);
} else {
if (Z_TYPE_P(data) == IS_OBJECT) {
phalcon_update_property_this_quick(this_ptr, SL("_data"), data, 6953229211038UL TSRMLS_CC);
}
}

PHALCON_INIT_VAR(cancel_on_fail);
Expand Down Expand Up @@ -35582,18 +35578,14 @@ static PHP_METHOD(Phalcon_Validation, getValue){
if (phalcon_method_exists(entity, method TSRMLS_CC) == SUCCESS) {
PHALCON_INIT_VAR(value);
phalcon_call_method_zval(value, entity, method);
} else if (phalcon_method_quick_exists_ex(entity, SS("readattribute"), 15677543873686566549UL TSRMLS_CC) == SUCCESS) {
PHALCON_INIT_VAR(value);
phalcon_call_method_p1_key(value, entity, "readattribute", attribute, 15677543873686566549UL);
} else if (phalcon_isset_property_zval(entity, attribute TSRMLS_CC)) {
PHALCON_OBS_VAR(value);
phalcon_read_property_zval(&value, entity, attribute, PH_NOISY_CC);
} else {
if (phalcon_method_quick_exists_ex(entity, SS("readattribute"), 15677543873686566549UL TSRMLS_CC) == SUCCESS) {
PHALCON_INIT_NVAR(value);
phalcon_call_method_key(value, entity, "readattribute", 15677543873686566549UL);
} else {
if (phalcon_isset_property_zval(entity, attribute TSRMLS_CC)) {
PHALCON_OBS_NVAR(value);
phalcon_read_property_zval(&value, entity, attribute, PH_NOISY_CC);
} else {
PHALCON_INIT_NVAR(value);
}
}
PHALCON_INIT_VAR(value);
}

RETURN_CCTOR(value);
Expand Down Expand Up @@ -35684,7 +35676,6 @@ static PHP_METHOD(Phalcon_Validation, getValue){




#ifdef HAVE_CONFIG_H
#endif

Expand Down
25 changes: 8 additions & 17 deletions build/safe/phalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -35389,12 +35389,8 @@ static PHP_METHOD(Phalcon_Validation, validate){
}

phalcon_update_property_this(this_ptr, SL("_messages"), messages TSRMLS_CC);
if (Z_TYPE_P(data) == IS_ARRAY) {
if (Z_TYPE_P(data) == IS_ARRAY || Z_TYPE_P(data) == IS_OBJECT) {
phalcon_update_property_this(this_ptr, SL("_data"), data TSRMLS_CC);
} else {
if (Z_TYPE_P(data) == IS_OBJECT) {
phalcon_update_property_this(this_ptr, SL("_data"), data TSRMLS_CC);
}
}

PHALCON_INIT_VAR(cancel_on_fail);
Expand Down Expand Up @@ -35582,18 +35578,14 @@ static PHP_METHOD(Phalcon_Validation, getValue){
if (phalcon_method_exists(entity, method TSRMLS_CC) == SUCCESS) {
PHALCON_INIT_VAR(value);
phalcon_call_method_zval(value, entity, method);
} else if (phalcon_method_exists_ex(entity, SS("readattribute") TSRMLS_CC) == SUCCESS) {
PHALCON_INIT_VAR(value);
phalcon_call_method_p1(value, entity, "readattribute", attribute);
} else if (phalcon_isset_property_zval(entity, attribute TSRMLS_CC)) {
PHALCON_OBS_VAR(value);
phalcon_read_property_zval(&value, entity, attribute, PH_NOISY_CC);
} else {
if (phalcon_method_exists_ex(entity, SS("readattribute") TSRMLS_CC) == SUCCESS) {
PHALCON_INIT_NVAR(value);
phalcon_call_method(value, entity, "readattribute");
} else {
if (phalcon_isset_property_zval(entity, attribute TSRMLS_CC)) {
PHALCON_OBS_NVAR(value);
phalcon_read_property_zval(&value, entity, attribute, PH_NOISY_CC);
} else {
PHALCON_INIT_NVAR(value);
}
}
PHALCON_INIT_VAR(value);
}

RETURN_CCTOR(value);
Expand Down Expand Up @@ -35684,7 +35676,6 @@ static PHP_METHOD(Phalcon_Validation, getValue){




#ifdef HAVE_CONFIG_H
#endif

Expand Down