Fix OOM issues when exporting to STDOUT by schlessera · Pull Request #5546 · wp-cli/wp-cli

This fixes the out-of-memory errors on db export to STDOUT by using fpassthru() when $send_to_shell is true, instead of using stream_get_contents().

This is technically not a full fix, as the stream is still fully read when $send_to_shell is false, however there's no current use case I can think of where that would matter.

Fixes wp-cli/db-command#195