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

Skip to content

Commit 2f38a5a

Browse files
bug #35267 [Debug] fix ClassNotFoundFatalErrorHandler (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [Debug] fix ClassNotFoundFatalErrorHandler | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Spotted by the CI on 4.4, see #35266 for details. Replaces #35255 /cc @mpdude Commits ------- 0c320fe [Debug] fix ClassNotFoundFatalErrorHandler
2 parents aaf6915 + 0c320fe commit 2f38a5a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ public function flattenDataProvider()
199199

200200
public function testArguments()
201201
{
202+
if (\PHP_VERSION_ID >= 70400) {
203+
$this->markTestSkipped('PHP 7.4 removes arguments from exception traces.');
204+
}
205+
202206
$dh = opendir(__DIR__);
203207
$fh = tmpfile();
204208

@@ -261,6 +265,10 @@ function () {},
261265

262266
public function testRecursionInArguments()
263267
{
268+
if (\PHP_VERSION_ID >= 70400) {
269+
$this->markTestSkipped('PHP 7.4 removes arguments from exception traces.');
270+
}
271+
264272
$a = null;
265273
$a = ['foo', [2, &$a]];
266274
$exception = $this->createException($a);
@@ -272,6 +280,10 @@ public function testRecursionInArguments()
272280

273281
public function testTooBigArray()
274282
{
283+
if (\PHP_VERSION_ID >= 70400) {
284+
$this->markTestSkipped('PHP 7.4 removes arguments from exception traces.');
285+
}
286+
275287
$a = [];
276288
for ($i = 0; $i < 20; ++$i) {
277289
for ($j = 0; $j < 50; ++$j) {

src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ public static function setUpBeforeClass()
2929
// get class loaders wrapped by DebugClassLoader
3030
if ($function[0] instanceof DebugClassLoader) {
3131
$function = $function[0]->getClassLoader();
32+
33+
if (!\is_array($function)) {
34+
continue;
35+
}
3236
}
3337

3438
if ($function[0] instanceof ComposerClassLoader) {

0 commit comments

Comments
 (0)