Merge pull request #15834 from francescbassas/patch-16
[civicrm-core.git] / Civi / Payment / PropertyBag.php
index afdee0abb6908da4660426ea60a30a8cbfd84ce5..6cea55241e7ec38f40ffe0c4bf99e3b59f018e1f 100644 (file)
@@ -22,7 +22,9 @@ use CRM_Core_PseudoConstant;
  */
 class PropertyBag implements \ArrayAccess {
   /**
-   * @var array - see legacyWarning */
+   * @var array
+   * - see legacyWarning
+   */
   public static $legacyWarnings = [];
 
   protected $props = ['default' => []];
@@ -278,9 +280,9 @@ class PropertyBag implements \ArrayAccess {
    * @param array $data
    */
   public function mergeLegacyInputParams($data) {
-    $this->legacyWarning("We have merged input params into the property bag for now but please rewrite code to not use this.");
+    $this->legacyWarning('We have merged input params into the property bag for now but please rewrite code to not use this.');
     foreach ($data as $key => $value) {
-      if ($value !== NULL) {
+      if ($value !== NULL && $value !== '') {
         $this->offsetSet($key, $value);
       }
     }