mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Fix Bug #66736 fpassthru broken
This commit is contained in:
parent
7ab5c593f7
commit
d08b4dbf23
3 changed files with 22 additions and 2 deletions
|
@ -234,6 +234,13 @@ PHPAPI int php_output_get_status(TSRMLS_D)
|
|||
* Unbuffered write */
|
||||
PHPAPI int php_output_write_unbuffered(const char *str, size_t len TSRMLS_DC)
|
||||
{
|
||||
#if PHP_DEBUG
|
||||
if (len > UINT_MAX) {
|
||||
php_error(E_WARNING, "Attempt to output more than UINT_MAX bytes at once; "
|
||||
"output will be truncated %lu => %lu",
|
||||
(unsigned long) len, (unsigned long) (len % UINT_MAX));
|
||||
}
|
||||
#endif
|
||||
if (OG(flags) & PHP_OUTPUT_DISABLED) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -248,6 +255,13 @@ PHPAPI int php_output_write_unbuffered(const char *str, size_t len TSRMLS_DC)
|
|||
* Buffered write */
|
||||
PHPAPI int php_output_write(const char *str, size_t len TSRMLS_DC)
|
||||
{
|
||||
#if PHP_DEBUG
|
||||
if (len > UINT_MAX) {
|
||||
php_error(E_WARNING, "Attempt to output more than UINT_MAX bytes at once; "
|
||||
"output will be truncated %lu => %lu",
|
||||
(unsigned long) len, (unsigned long) (len % UINT_MAX));
|
||||
}
|
||||
#endif
|
||||
if (OG(flags) & PHP_OUTPUT_DISABLED) {
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue