From b99340d59161e0b6036ed5cab700b68adee8be61 Mon Sep 17 00:00:00 2001 From: Luis Aveiga Date: Wed, 2 Oct 2024 12:18:03 -0500 Subject: [PATCH] ISSUE-370: check empty before array check --- src/ScaffoldInstallerPlugin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ScaffoldInstallerPlugin.php b/src/ScaffoldInstallerPlugin.php index 487facc9..12e1deca 100644 --- a/src/ScaffoldInstallerPlugin.php +++ b/src/ScaffoldInstallerPlugin.php @@ -95,13 +95,13 @@ private function _checkComposerPatchesAreLocal() $patchesContent = $patchesInComposer; } - // Patches content is not a string. - if (!is_array($patchesContent)) { - $this->io->warning("The patches content can't be validated. Check your patches defined in Composer."); + if (empty($patchesContent)) { return; } - if (empty($patchesContent)) { + // Patches content is not a string. + if (!is_array($patchesContent)) { + $this->io->warning("The patches content can't be validated. Check your patches defined in Composer."); return; }