mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
1fd559151b
commit
857de725d1
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue