Skip to content

Commit 79e1610

Browse files
authored
Merge pull request #141 from valeriySeregin/fix-default-value-in-prompt
2 parents b3457a8 + 0c04162 commit 79e1610

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/cli/Streams.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public static function input( $format = null, $hide = false ) {
160160
* @return string The users input.
161161
* @see cli\input()
162162
*/
163-
public static function prompt( $question, $default = null, $marker = ': ', $hide = false ) {
163+
public static function prompt( $question, $default = false, $marker = ': ', $hide = false ) {
164164
if( $default && strpos( $question, '[' ) === false ) {
165165
$question .= ' [' . $default . ']';
166166
}

lib/cli/cli.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function input( $format = null ) {
9494
* continue displaying until input is received.
9595
*
9696
* @param string $question The question to ask the user.
97-
* @param string $default A default value if the user provides no input.
97+
* @param string|false $default A default value if the user provides no input. Default false.
9898
* @param string $marker A string to append to the question and default value on display.
9999
* @param boolean $hide If the user input should be hidden
100100
* @return string The users input.

0 commit comments

Comments
 (0)