Skip to content

Commit

Permalink
Fix bug than allow zero length key name
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Mar 15, 2013
1 parent f3aac2e commit 9811f48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configs/yaf_config_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ PHP_METHOD(yaf_config_simple, set) {
return;
}

if (Z_TYPE_P(name) != IS_STRING || Z_TYPE_P(name) != IS_STRING) {
if (Z_TYPE_P(name) != IS_STRING || !Z_STRLEN_P(name)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expect a string key name");
RETURN_FALSE;
}
Expand Down

0 comments on commit 9811f48

Please sign in to comment.