because of fflush() called on already closed filedescriptor)
- Fixed bug #30106 (SOAP cannot not parse 'ref' element. Causes Uncaught
SoapFault exception). (Dmitry)
- Fixed bug #29989 (type re_registers redefined in oniguruma.h). (Moriyoshi)
+- Fixed bug #28803 (enabled debug causes bailout errors with CLI on AIX
+ because of fflush() called on already closed filedescriptor). (Tony)
- Fixed bug #29767 (Weird behaviour of __set($name, $value)). (Dmitry)
- Fixed bug #29733 (printf() handles repeated placeholders wrong).
(bugs dot php dot net at bluetwanger dot de, Ilia)
static void sapi_cli_flush(void *server_context)
{
- if (fflush(stdout)==EOF) {
+ /* Ignore EBADF here, it's caused by the fact that STDIN/STDOUT/STDERR streams
+ * are/could be closed before fflush() is called.
+ */
+ if (fflush(stdout)==EOF && errno!=EBADF) {
#ifndef PHP_CLI_WIN32_NO_CONSOLE
php_handle_aborted_connection();
#endif