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

Signed-off-by: default avatarcanyonknight <>
Signed-off-by: default avatarLukas Fleischer <>
parent 1fd55915
......@@ -379,9 +379,9 @@ if ($uid):
# Insert sources
$sources = explode(" ", $new_pkgbuild['source']);
foreach ($sources as $src) {
if ($src != "" ) {
if (!empty($new_pkgbuild['source'])) {
$sources = explode(" ", $new_pkgbuild['source']);
foreach ($sources as $src) {
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