[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [donate/master] Allow crypto intention without name



commit f4a0520d99779f3cc0bb4f2a4498200bc8c361ae
Author: Peter Haight <peterh@xxxxxxxxxxxxxxx>
Date:   Tue Mar 12 11:01:12 2019 -0700

    Allow crypto intention without name
    
    They want to allow people to submit an intention without putting their
    name.
    
    Also, I fixed the issue with the variable name from Anthony's code
    review.
    
    Issue #39726
    Issue #39955
---
 src/CryptocurrencyController.php | 2 --
 src/FieldHelper.php              | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/CryptocurrencyController.php b/src/CryptocurrencyController.php
index 82399160..155bcf7c 100644
--- a/src/CryptocurrencyController.php
+++ b/src/CryptocurrencyController.php
@@ -8,8 +8,6 @@ class CryptocurrencyController extends BaseController {
     'currencyAmount',
     'email',
     'estimatedDonationDate',
-    'firstName',
-    'lastName',
   );
 
   public static $WALLETS = [[
diff --git a/src/FieldHelper.php b/src/FieldHelper.php
index 5c1c44ee..34caec0f 100644
--- a/src/FieldHelper.php
+++ b/src/FieldHelper.php
@@ -32,10 +32,10 @@ class FieldHelper {
     foreach ($requiredFieldNames as $requiredFieldName) {
       $value = ArrayExt::fetch($fields, $requiredFieldName);
       if ($this->isBlank($value)) {
-        $missing[] = $requiredFieldName;
+        $missingFieldNames[] = $requiredFieldName;
       }
     }
-    return $missing;
+    return $missingFieldNames;
   }
 
   public function createFieldArray($source, $fieldNames) {



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits