From c1e60a0abdb4fd6d5e2fa6874b0bc3354d397439 Mon Sep 17 00:00:00 2001 From: Gavin Staniforth Date: Wed, 23 Sep 2015 13:46:35 +0100 Subject: [PATCH] Ensure the bin directory exists before checking empty Line 130 has similar logic so avoided doing the check withiin `isDirEmpty()` --- src/Composer/Installer/LibraryInstaller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Installer/LibraryInstaller.php b/src/Composer/Installer/LibraryInstaller.php index b785c4da2..75b3a0c6e 100644 --- a/src/Composer/Installer/LibraryInstaller.php +++ b/src/Composer/Installer/LibraryInstaller.php @@ -268,7 +268,7 @@ class LibraryInstaller implements InstallerInterface } // attempt removing the bin dir in case it is left empty - if ($this->filesystem->isDirEmpty($this->binDir)) { + if ((is_dir($this->binDir)) && ($this->filesystem->isDirEmpty($this->binDir))) { @rmdir($this->binDir); } }