Remove do-nothing code.
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 11 Aug 2023 03:14:40 +0000 (15:14 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 11 Aug 2023 03:14:40 +0000 (15:14 +1200)
This code conditionally adds the field is_required to the array that already
contains the field is_required

CRM/Price/BAO/PriceSet.php

index f2c2aa892fd69403a3e06a216b68312b8c41166a..7388afcc742c784094cbacad7af9e8bdecbb96c3 100644 (file)
@@ -386,7 +386,7 @@ WHERE     cpf.price_set_id = %1";
    * @param int $setID
    *   Price Set ID.
    * @param bool $required
-   *   Appears to have no effect based on reading the code.
+   *   Deprecated.
    * @param bool $doNotIncludeExpiredFields
    *   Should only fields where today's date falls within the valid range be returned?
    *
@@ -415,9 +415,6 @@ WHERE     cpf.price_set_id = %1";
       'visibility_id',
       'is_required',
     ];
-    if ($required == TRUE) {
-      $priceFields[] = 'is_required';
-    }
 
     // create select
     $select = 'SELECT ' . implode(',', $priceFields);