From 995076af3b88c030fe2a01af012ce4d5e05acb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sat, 21 Apr 2007 19:46:17 +0000 Subject: [PATCH] Fix warnings in downloadurl::processForm(). Calling this method with inappropriate $aClean[] data is perfectly valid but in tht case the function should return silently --- include/downloadurl.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/downloadurl.php b/include/downloadurl.php index 8bb4b9a..9631f90 100644 --- a/include/downloadurl.php +++ b/include/downloadurl.php @@ -301,6 +301,12 @@ class downloadurl /* Process a form made only for submitting one URL */ function processFormSingle($iVersionId, $aValues, $bUnQueue = FALSE) { + /* Calling this function without suitable input data is perfectly valid, + but in that case there is nothing to do here */ + if(empty($aValues['sDownloadUrlDescription']) || + empty($aValues['sDownloadUrlUrl'])) + return; + $iId = null; if($hResult = appData::getData($iVersionId, "downloadurl", TRUE, TRUE)) {