From e00d48490bbba38a2757b28dfd930dbdf4870331 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 13 Sep 2014 20:12:21 +0200 Subject: [PATCH] better way to check for an empty string --- ext/standard/http_fopen_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 4bf86a4947..45fa637c0d 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -437,7 +437,7 @@ finish: /* 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); } - if (tmp && strlen(tmp) > 0) { + if (tmp && tmp[0] != '\0') { char *s; user_headers = estrdup(tmp); -- 2.40.0