Skip to content

Commit

Permalink
Do not use sys error
Browse files Browse the repository at this point in the history
  • Loading branch information
twose committed May 11, 2020
1 parent 327b20e commit 644b4f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions swoole_http_response.cc
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ static PHP_METHOD(swoole_http_response, sendfile)
}
if (file_stat.st_size == 0)
{
php_swoole_sys_error(E_WARNING, "can't send empty file[%s]", file);
php_swoole_error(E_WARNING, "can't send empty file[%s]", file);
RETURN_FALSE;
}
if (file_stat.st_size <= offset)
Expand All @@ -946,7 +946,7 @@ static PHP_METHOD(swoole_http_response, sendfile)
}
if (length > file_stat.st_size - offset)
{
php_swoole_sys_error(E_WARNING, "parameter $length[" ZEND_LONG_FMT "] exceeds the file size", length);
php_swoole_error(E_WARNING, "parameter $length[" ZEND_LONG_FMT "] exceeds the file size", length);
RETURN_FALSE;
}
if (length == 0)
Expand Down

0 comments on commit 644b4f0

Please sign in to comment.