From 0a954f687392888107e6035cf5a925ef528bdd43 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel
Date: Mon, 18 Oct 2010 17:06:59 +0200 Subject: [PATCH] Catch empty sources dir. --- components/lib/Components/Pear/InstallLocation.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/lib/Components/Pear/InstallLocation.php b/components/lib/Components/Pear/InstallLocation.php index 18bbc8785..75f952c9b 100644 --- a/components/lib/Components/Pear/InstallLocation.php +++ b/components/lib/Components/Pear/InstallLocation.php @@ -376,6 +376,9 @@ class Components_Pear_InstallLocation private function _identifyMatchingLocalPackage($package) { + if (empty($this->_source_directory)) { + return false; + } foreach (new DirectoryIterator($this->_source_directory) as $file) { if (preg_match('/' . $package . '-[0-9]+(\.[0-9]+)+([a-z0-9]+)?/', $file->getBasename('.tgz'), $matches)) { return $file->getPathname(); -- 2.11.0