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> --- web/html/pkgsubmit.php | 4 ++-- 1 file 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); -- 1.7.12.2