summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2012-10-01 19:01:41 -0400
committerLukas Fleischer <archlinux@cryptocrack.de>2012-10-03 00:21:21 +0200
commit238695c40294270afa5bd94061c9a4b960a880c3 (patch)
treea170636457485badc780818a03d4618ddc53e07b /web
parente9ed60566ee24134d79e7935fcdaf25e97fb3f6b (diff)
downloadaurweb-238695c40294270afa5bd94061c9a4b960a880c3.tar.xz
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 857de725d1c87da005b4ab8e9a88222fd19aab4b. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/html/pkgsubmit.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 930add0..09e95ca 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -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);