File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ static int multipart_buffer_headers(multipart_buffer *self, zend_llist *header T
408
408
409
409
/* get lines of text, or CRLF_CRLF */
410
410
411
- while ( (line = get_line (self TSRMLS_CC )) && strlen ( line ) > 0 )
411
+ while ( (line = get_line (self TSRMLS_CC )) && line [ 0 ] != '\0' )
412
412
{
413
413
/* add header to table */
414
414
char * key = line ;
@@ -979,7 +979,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
979
979
continue ;
980
980
}
981
981
982
- if (strlen ( filename ) == 0 ) {
982
+ if (filename [ 0 ] == '\0' ) {
983
983
#if DEBUG_FILE_UPLOAD
984
984
sapi_module .sapi_error (E_NOTICE , "No file uploaded" );
985
985
#endif
@@ -1063,12 +1063,12 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1063
1063
1064
1064
if (!cancel_upload && !end ) {
1065
1065
#if DEBUG_FILE_UPLOAD
1066
- sapi_module .sapi_error (E_NOTICE , "Missing mime boundary at the end of the data for file %s" , strlen ( filename ) > 0 ? filename : "" );
1066
+ sapi_module .sapi_error (E_NOTICE , "Missing mime boundary at the end of the data for file %s" , filename [ 0 ] != '\0' ? filename : "" );
1067
1067
#endif
1068
1068
cancel_upload = UPLOAD_ERROR_C ;
1069
1069
}
1070
1070
#if DEBUG_FILE_UPLOAD
1071
- if (strlen ( filename ) > 0 && total_bytes == 0 && !cancel_upload ) {
1071
+ if (filename [ 0 ] != '\0' && total_bytes == 0 && !cancel_upload ) {
1072
1072
sapi_module .sapi_error (E_WARNING , "Uploaded file size 0 - file [%s=%s] not saved" , param , filename );
1073
1073
cancel_upload = 5 ;
1074
1074
}
You can’t perform that action at this time.
0 commit comments