Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d6dfe98

Browse files
[php7] Fix for substr() always returning a string
1 parent c37387d commit d6dfe98

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Symfony/Component/Console/Style/SymfonyStyle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ private function autoPrependBlock()
379379
{
380380
$chars = substr(str_replace(PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2);
381381

382-
if (false === $chars) {
382+
if (!isset($chars[0])) {
383383
return $this->newLine(); //empty history, so we should start with a new line.
384384
}
385385
//Prepend new line for each non LF chars (This means no blank line was output before)

src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace Symfony\Component\VarDumper\Tests\Caster;
1313

14-
use Symfony\Component\VarDumper\Cloner\VarCloner;
15-
use Symfony\Component\VarDumper\Dumper\CliDumper;
1614
use Symfony\Component\VarDumper\Test\VarDumperTestCase;
1715

1816
/**
@@ -34,7 +32,7 @@ public function testReflectionCaster()
3432
constants: array:3 [
3533
"IS_IMPLICIT_ABSTRACT" => 16
3634
"IS_EXPLICIT_ABSTRACT" => 32
37-
"IS_FINAL" => 64
35+
"IS_FINAL" => %d
3836
]
3937
properties: array:%d [
4038
"name" => ReflectionProperty {

0 commit comments

Comments
 (0)