From c6e09db4ffa884369339202ad2f36a90d7d3a8f1 Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Sun, 10 Jan 2021 21:54:49 -0500 Subject: [PATCH] Add non-emptiness check --- tests/FileUpdates/TemporaryUpdateTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/FileUpdates/TemporaryUpdateTest.php b/tests/FileUpdates/TemporaryUpdateTest.php index 73369fc54..599e53bf4 100644 --- a/tests/FileUpdates/TemporaryUpdateTest.php +++ b/tests/FileUpdates/TemporaryUpdateTest.php @@ -122,7 +122,7 @@ class TemporaryUpdateTest extends \Psalm\Tests\TestCase $this->assertSame($error_positions[$i + 1], $found_positions, 'stage ' . ($i + 2)); } - if ($test_save) { + if ($test_save && $file_stages) { $last_file_stage = end($file_stages); foreach ($last_file_stage as $file_path => $_) {