better way to check for an empty string

This commit is contained in:
Anatol Belski 2014-09-13 20:12:21 +02:00
parent f357628fc9
commit e00d48490b

View file

@ -437,7 +437,7 @@ finish:
/* Remove newlines and spaces from start and end php_trim will estrndup() */ /* Remove newlines and spaces from start and end php_trim will estrndup() */
tmp = php_trim(Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval), NULL, 0, NULL, 3 TSRMLS_CC); tmp = php_trim(Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval), NULL, 0, NULL, 3 TSRMLS_CC);
} }
if (tmp && strlen(tmp) > 0) { if (tmp && tmp[0] != '\0') {
char *s; char *s;
user_headers = estrdup(tmp); user_headers = estrdup(tmp);