go to bug id or search bugs for
According to the manual, ob_get_flush() and ob_end_flush() should fail if PHP_OUTPUT_HANDLER_FLUSHABLE was not given during ob_start(). That seems like a sensible policy, but the flag is only checked during ob_flush().
I noticed this bug while reading output.c, I don't actually use those functions.
ob_start(null, 0, PHP_OUTPUT_HANDLER_REMOVABLE);
PHP Notice: ob_get_flush(): failed to flush buffer of default output handler (0) in ob_get_flush.php on line 4
Add a Patch
Add a Pull Request
Actually none of these is a "flush" as in ob_flush(), where the output buffer stays on the stack.
Both ob_get_flush() and ob_end_flush() actually finish the output buffer/handler.
Naming of the userland API is ambiguous, but you can see in the output.c sources, that both of these functions actually call php_output_end() and not php_output_flush().
Reclassifying as "Doc Bug", wrt PHP_OUTPUT_HANDLER_FLUSHABLE only affects ob_flush().
Could you possibly add tests for the PHP_OUTPUT_HANDLER_* flags? It would make it much easier for me to figure out what they're meant to do.
See also bug #71486
Related To: Bug #74399