diff options
Diffstat (limited to 'core/command')
-rw-r--r-- | core/command/db/converttype.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php index 8f3047b8a0b..02dc45383e8 100644 --- a/core/command/db/converttype.php +++ b/core/command/db/converttype.php @@ -123,8 +123,11 @@ class ConvertType extends Command { return; } - // Read from stdin + // Read from stdin. stream_set_blocking is used to prevent blocking + // when nothing is passed via stdin. + stream_set_blocking(STDIN, 0); $password = file_get_contents('php://stdin'); + stream_set_blocking(STDIN, 1); if (trim($password) !== '') { $input->setOption('password', $password); return; |