pkgsubmit.php: Fix PHP notice for depends processing

A foreach() is run without verifying an uploaded package has any depends.
Fix the undefined index notice for packages uploaded with no depends.
Similar to commit 857de725d1.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
canyonknight 2012-10-01 19:01:41 -04:00 committed by Lukas Fleischer
parent e9ed60566e
commit 238695c402

View file

@ -390,8 +390,8 @@ if ($uid):
}
# Update package depends
$depends = explode(" ", $new_pkgbuild['depends']);
if ($depends !== false) {
if (!empty($new_pkgbuild['depends'])) {
$depends = explode(" ", $new_pkgbuild['depends']);
foreach ($depends as $dep) {
$deppkgname = preg_replace("/(<|<=|=|>=|>).*/", "", $dep);
$depcondition = str_replace($deppkgname, "", $dep);