Commit 238695c4 authored by canyonknight's avatar canyonknight Committed by Lukas Fleischer
Browse files

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 857de725


Signed-off-by: default avatarcanyonknight <>
Signed-off-by: default avatarLukas Fleischer <>
parent e9ed6056
......@@ -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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment