appdb/include downloadurl.php

WineHQ wineowner at wine.codeweavers.com
Sat Apr 21 14:46:18 CDT 2007


ChangeSet ID:	31079
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/04/21 14:46:17

Modified files:
	include        : downloadurl.php 

Log message:
	Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
	Fix warnings in downloadurl::processForm(). Calling this method with inappropriate $aClean[]
	data is perfectly valid but in tht case the function should return silently

Patch: http://cvs.winehq.org/patch.py?id=31079

Old revision  New revision  Changes     Path
 1.12          1.13          +6 -0       appdb/include/downloadurl.php

Index: appdb/include/downloadurl.php
diff -u -p appdb/include/downloadurl.php:1.12 appdb/include/downloadurl.php:1.13
--- appdb/include/downloadurl.php:1.12	21 Apr 2007 19:46:17 -0000
+++ appdb/include/downloadurl.php	21 Apr 2007 19:46:17 -0000
@@ -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))
         {



More information about the wine-cvs mailing list