Commit 857de725 authored by canyonknight's avatar canyonknight Committed by Lukas Fleischer
Browse files

pkgsubmit.php: Refactor source processing to fix PHP notice



A foreach() being run without checking to see if the uploaded PKGBUILD had any
sources now no longer causes an undefined index notice when there are no
sources.
Signed-off-by: default avatarcanyonknight <canyonknight@gmail.com>
Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent 1fd55915
...@@ -379,9 +379,9 @@ if ($uid): ...@@ -379,9 +379,9 @@ if ($uid):
} }
# Insert sources # Insert sources
$sources = explode(" ", $new_pkgbuild['source']); if (!empty($new_pkgbuild['source'])) {
foreach ($sources as $src) { $sources = explode(" ", $new_pkgbuild['source']);
if ($src != "" ) { foreach ($sources as $src) {
add_pkg_src($packageID, $src, $dbh); add_pkg_src($packageID, $src, $dbh);
} }
} }
......
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