Skip to content

Commit 9a491e7

Browse files
committed
Merge branch '2.5'
* 2.5: fixed previous merge Added missing `break` statement don't disable constructor calls to mockups of classes that extend internal PHP classes Small comment update according to PSR-2 [Yaml] fix overwriting of keys after merged map [Yaml] fix priority of sequence merges according to spec [Console] Fixed notice in QuestionHelper [Console] Fixed notice in DialogHelper [Yaml] refactoring of merges for performance [Console] remove weird use statement [HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6 [Filesystem] Fix test suite on OSX [FrameworkBundle] Redirect server output to /dev/null in case no verbosity is needed Add framework-bundle Conflicts: src/Symfony/Component/Yaml/Parser.php
2 parents f41913c + 5643ea0 commit 9a491e7

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Helper/DialogHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function ask(OutputInterface $output, $question, $default = null, array $
157157
$c .= fread($inputStream, 2);
158158

159159
// A = Up Arrow. B = Down Arrow
160-
if ('A' === $c[2] || 'B' === $c[2]) {
160+
if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) {
161161
if ('A' === $c[2] && -1 === $ofs) {
162162
$ofs = 0;
163163
}

Helper/QuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
212212
$c .= fread($inputStream, 2);
213213

214214
// A = Up Arrow. B = Down Arrow
215-
if ('A' === $c[2] || 'B' === $c[2]) {
215+
if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) {
216216
if ('A' === $c[2] && -1 === $ofs) {
217217
$ofs = 0;
218218
}

Question/Question.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*/
1111

1212
namespace Symfony\Component\Console\Question;
13-
use Doctrine\Common\Proxy\Exception\InvalidArgumentException;
1413

1514
/**
1615
* Represents a Question.
@@ -184,7 +183,7 @@ public function getValidator()
184183
*
185184
* @return Question The current instance
186185
*
187-
* @throws InvalidArgumentException In case the number of attempts is invalid.
186+
* @throws \InvalidArgumentException In case the number of attempts is invalid.
188187
*/
189188
public function setMaxAttempts($attempts)
190189
{

0 commit comments

Comments
 (0)