dev/core#2108 fix deprecation notice take 2
authoreileen <emcnaughton@wikimedia.org>
Fri, 9 Oct 2020 03:43:34 +0000 (16:43 +1300)
committereileen <emcnaughton@wikimedia.org>
Fri, 9 Oct 2020 03:43:34 +0000 (16:43 +1300)
Loosens the deprecation notice - alternative to https://github.com/civicrm/civicrm-core/pull/18716 but
we should merge both IMHO

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.