Browse Source

Fixed option merging in Console::prompt()

defaults overided settings
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
f716bdd70d
  1. 4
      framework/yii/helpers/BaseConsole.php

4
framework/yii/helpers/BaseConsole.php

@ -700,14 +700,14 @@ class BaseConsole
public static function prompt($text, $options = array()) public static function prompt($text, $options = array())
{ {
$options = ArrayHelper::merge( $options = ArrayHelper::merge(
$options,
array( array(
'required' => false, 'required' => false,
'default' => null, 'default' => null,
'pattern' => null, 'pattern' => null,
'validator' => null, 'validator' => null,
'error' => 'Invalid input.', 'error' => 'Invalid input.',
) ),
$options
); );
$error = null; $error = null;

Loading…
Cancel
Save