[php7] Fix for substr() always returning a string
This commit is contained in:
parent
c37387dc02
commit
d6dfe9871c
@ -379,7 +379,7 @@ class SymfonyStyle extends OutputStyle
|
||||
{
|
||||
$chars = substr(str_replace(PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2);
|
||||
|
||||
if (false === $chars) {
|
||||
if (!isset($chars[0])) {
|
||||
return $this->newLine(); //empty history, so we should start with a new line.
|
||||
}
|
||||
//Prepend new line for each non LF chars (This means no blank line was output before)
|
||||
|
@ -11,8 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\VarDumper\Tests\Caster;
|
||||
|
||||
use Symfony\Component\VarDumper\Cloner\VarCloner;
|
||||
use Symfony\Component\VarDumper\Dumper\CliDumper;
|
||||
use Symfony\Component\VarDumper\Test\VarDumperTestCase;
|
||||
|
||||
/**
|
||||
@ -34,7 +32,7 @@ ReflectionClass {
|
||||
constants: array:3 [
|
||||
"IS_IMPLICIT_ABSTRACT" => 16
|
||||
"IS_EXPLICIT_ABSTRACT" => 32
|
||||
"IS_FINAL" => 64
|
||||
"IS_FINAL" => %d
|
||||
]
|
||||
properties: array:%d [
|
||||
"name" => ReflectionProperty {
|
||||
|
Reference in New Issue
Block a user