diff --git a/src/Symfony/Component/Console/Input/ArgvInput.php b/src/Symfony/Component/Console/Input/ArgvInput.php index 43cbe725fb..a6c2132797 100644 --- a/src/Symfony/Component/Console/Input/ArgvInput.php +++ b/src/Symfony/Component/Console/Input/ArgvInput.php @@ -215,8 +215,8 @@ class ArgvInput extends Input $option = $this->definition->getOption($name); - // Convert false values (from a previous call to substr()) to null - if (false === $value) { + // Convert empty values to null + if (!isset($value[0])) { $value = null; } diff --git a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php index 563bd0997e..a3ab18f894 100644 --- a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -121,11 +121,11 @@ PHP $that->assertEquals('->', $trace[0]['type']); $that->assertEquals(__FILE__, $trace[1]['file']); - $that->assertEquals(__CLASS__, $trace[1]['class']); + $that->assertEquals('Symfony\Component\Debug\Tests\ErrorHandlerTest', $trace[1]['class']); $that->assertEquals('triggerNotice', $trace[1]['function']); $that->assertEquals('::', $trace[1]['type']); - $that->assertEquals(__CLASS__, $trace[2]['class']); + $that->assertEquals('Symfony\Component\Debug\Tests\ErrorHandlerTest', $trace[2]['class']); $that->assertEquals('testNotice', $trace[2]['function']); $that->assertEquals('->', $trace[2]['type']); }; diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index fc46ab3caf..08cfac4224 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -320,7 +320,7 @@ class Parser return; } - if ($inSequence && $oldLineIndentation === $newIndent && '-' === $data[0][0]) { + if ($inSequence && $oldLineIndentation === $newIndent && isset($data[0][0]) && '-' === $data[0][0]) { // the previous line contained a dash but no item content, this line is a sequence item with the same indentation // and therefore no nested list or mapping $this->moveToPreviousLine();