8000 [php7] Fix for substr() always returning a string · symfony/symfony@378c946 · GitHub
[go: up one dir, main page]

Skip to content

Commit 378c946

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

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testReflectionCaster()
3434
constants: array:3 [
3535
"IS_IMPLICIT_ABSTRACT" => 16
3636
"IS_EXPLICIT_ABSTRACT" => 32
37-
"IS_FINAL" => 64
37+
"IS_FINAL" => %d
3838
]
3939
properties: array:%d [
4040
"name" => ReflectionProperty {

0 commit comments

Comments
 (0)
0