From: Gunnar Wrobel
Date: Mon, 18 Oct 2010 15:06:59 +0000 (+0200) Subject: Catch empty sources dir. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0a954f687392888107e6035cf5a925ef528bdd43;p=horde.git Catch empty sources dir. --- 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();