Skip to content

Commit c63457f

Browse files
committed
Try using binary mode for STDIN detection
1 parent 2cbd22c commit c63457f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WP_CLI/Entity/Utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Utils {
1010
* @return bool
1111
*/
1212
public static function has_stdin() {
13-
$handle = fopen( 'php://stdin', 'r' );
13+
$handle = fopen( 'php://stdin', 'rb' );
1414
$read = array( $handle );
1515
$write = null;
1616
$except = null;

0 commit comments

Comments
 (0)