Merge pull request #18717 from eileenmcnaughton/static2
authorcolemanw <coleman@civicrm.org>
Sat, 10 Oct 2020 15:39:01 +0000 (11:39 -0400)
committerGitHub <noreply@github.com>
Sat, 10 Oct 2020 15:39:01 +0000 (11:39 -0400)
dev/core#2108 fix deprecation notice take 2

CRM/Core/Form.php

index 2cd2c226b5dbe675e14d2d6e25118ef9fd8662e4..9795790fa31a7d892d710160b158170af69663ac 100644 (file)
@@ -370,7 +370,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
       CRM_Core_Error::deprecatedFunctionWarning('CRM_Core_Form::addRadio');
     }
 
-    if ($attributes && !is_array($attributes)) {
+    if ($type !== 'static' && $attributes && !is_array($attributes)) {
       // The $attributes param used to allow for strings and would default to an
       // empty string.  However, now that the variable is heavily manipulated,
       // we should expect it to always be an array.