Body: <p>I recently updated CiviCRM and am now having errors with the CiviMail reports. My setup uses:</p>
  <p><strong>CiviCRM 5.32.2</strong></p>
  <p><strong>Drupal    7.77</strong></p>
  <p><strong>PHP 7.4</strong></p>
  <p>Below is the step-by-step description of what happens.</p>
  <ol>
  <li>Click on <strong>Mailings</strong> in CiviCRM</li>
  <li>Select <strong>Scheduled and Sent Mailings</strong></li>
  <li>Click on any completed mailing <strong>Report</strong></li>
  <li>Click on any of the <strong>report items</strong> having more than 50 results--&quot;successful deliveries&quot; or &quot;unique opens,&quot; etc.
  When I do this, I get the list of contacts and 3 errors are logged in the Drupal logs. They are:</li>
  </ol>
  <p>_<strong><strong><strong><strong>ERROR 1</strong></strong></strong></strong></p>
  <blockquote>
  <p>Location: <a href="http://mysite.org/civicrm/report/instance/33?mailing_id_value=390&amp;" rel="nofollow noreferrer">http://mysite.org/civicrm/report/instance/33?mailing_id_value=390&amp;</a>
  qfKey=54cfb81fd804cbcd6b07435da277f9354ce7ca54fd178e9_4603&amp;force=1&amp;crmPID=3&amp;
  snippet=json</p>
  <p>Referrer: <a href="http://mysite.org/civicrm/report/instance/33?reset=1&amp;mailing_id_value=390" rel="nofollow noreferrer">http://mysite.org/civicrm/report/instance/33?reset=1&amp;mailing_id_value=390</a></p>
  <p>Message: Notice: Undefined offset: 3 in HTML_QuickForm-&gt;addElement()
  (line 648 of
  /home/mysite/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm.php).</p>
  </blockquote>
  <p>_<strong><strong><strong><strong>ERROR 2</strong></strong></strong></strong></p>
  <blockquote>
  <p>Location: <a href="http://mysite.org/civicrm/report/instance/33?mailing_id_value=390&amp;" rel="nofollow noreferrer">http://mysite.org/civicrm/report/instance/33?mailing_id_value=390&amp;</a>
  qfKey=54cfb81fd804cbcd6b07435da277f9354ce7ca54fd178e9_4603&amp;force=1&amp;crmPID=3&amp;
  snippet=json</p>
  <p>Referrer: <a href="http://mysite.org/civicrm/report/instance/33?reset=1&amp;mailing_id_value=390" rel="nofollow noreferrer">http://mysite.org/civicrm/report/instance/33?reset=1&amp;mailing_id_value=390</a></p>
  <p>Message:  Warning: array_merge(): Expected parameter 2 to be an array,
  null given in HTML_QuickForm-&gt;addElement() (line 648 of
  /home/mysite/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm.php).</p>
  </blockquote>
  <p>_<strong><strong><strong><strong>ERROR 3</strong></strong></strong></strong></p>
  <blockquote>
  <p>Location: <a href="http://mysite.org/civicrm/report/instance/33?mailing_id_value=390&amp;" rel="nofollow noreferrer">http://mysite.org/civicrm/report/instance/33?mailing_id_value=390&amp;</a>
  qfKey=54cfb81fd804cbcd6b07435da277f9354ce7ca54fd178e9_4603&amp;force=1&amp;crmPID=3&amp;
  snippet=json</p>
  <p>referrer: <a href="http://mysite.org/civicrm/report/instance/33?reset=1&amp;mailing_id_value=390" rel="nofollow noreferrer">http://mysite.org/civicrm/report/instance/33?reset=1&amp;mailing_id_value=390</a></p>
  <p>Message: Notice: Undefined index: class in HTML_QuickForm-&gt;addElement() (line 649 of
  /home/mysite/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm.php).</p>
  </blockquote>
  <ol start="5">
  <li>Next, click the up arrow on the upper right of the list for going to the next page of contacts. Once again the same 3 errors above are added to the Drupal Log.</li>
  </ol>
  <p><a href="https://i.sstatic.net/DtqX5.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DtqX5.gif" alt="screen shot of Drupal error log after step 4" /></a></p>
  <ol start="6">
  <li>The page loads with the following form and SQL query (see image) and the up-arrow is gone from the paging. One time, the top toolbar drop-downs also stopped working.
  <a href="https://i.sstatic.net/6kVfJ.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6kVfJ.gif" alt="screen shot of page that loads after the first page." /></a></li>
  </ol>
  <p>My question is: Why is this quickform displaying when you go to page 2 or any page past the first one? Insights, please?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-18T19:07:52.043Z
Comments.Text: I can't reproduce this on the latest dev version. Perhaps it is already fixed?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-05T08:21:00.647Z
Comments.Text: I'm having the exact same issue. **CiviCRM 5.32.2** **Wordpress 5.6** **PHP 7.2** Seems to be a problem introduced just recently as I didn't notice it a couple of patches ago. Was made aware of it by the mail_report cronjob running on the server. Got an email saying PHP Warning: array_merge(): Expected parameter 2 to be an array, null given in /var/www/wordpress/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm.php on line 648 ...and then some HTML, JS and a bit of PHP, probably from the mailing template the message is referring to.
Comments.UserDisplayName: 1wbzx5k2y
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-08T17:00:17.907Z
Comments.Text: PHP 7.4 isn't fully supported by CiviCRM yet. The recommended version is PHP 7.3. https://docs.civicrm.org/installation/en/latest/general/requirements/#php-version
Comments.UserDisplayName: William Mortada
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-13T13:38:00.067Z
Comments.Text: I changed PHP 7.4 to 7.3 and it did not fix the problem.
Comments.UserDisplayName: lkwetter
Tags: <civimail><reports>
Title: Civimail Reports Errors
ThreadText: # Civimail Reports Errors
  
  (Asked by: username_0 on 2020-12-17)
  
  I recently updated CiviCRM and am now having errors with the CiviMail reports. My setup uses:
  
  **CiviCRM 5.32.2**
  
  **Drupal 7.77**
  
  **PHP 7.4**
  
  Below is the step-by-step description of what happens.
  
  1. Click on **Mailings** in CiviCRM
  2. Select **Scheduled and Sent Mailings**
  3. Click on any completed mailing **Report**
  4. Click on any of the **report items** having more than 50 results--"successful deliveries" or "unique opens," etc.
     When I do this, I get the list of contacts and 3 errors are logged in the Drupal logs. They are:
  
  \_********ERROR 1********
  
  > Location: <http://mysite.org/civicrm/report/instance/33?mailing_id_value=390&>
  > qfKey=54cfb81fd804cbcd6b07435da277f9354ce7ca54fd178e9\_4603&force=1&crmPID=3&
  > snippet=json
  >
  > Referrer: <http://mysite.org/civicrm/report/instance/33?reset=1&mailing_id_value=390>
  >
  > Message: Notice: Undefined offset: 3 in HTML\_QuickForm->addElement()
  > (line 648 of
  > /home/mysite/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm.php).
  
  \_********ERROR 2********
  
  > Location: <http://mysite.org/civicrm/report/instance/33?mailing_id_value=390&>
  > qfKey=54cfb81fd804cbcd6b07435da277f9354ce7ca54fd178e9\_4603&force=1&crmPID=3&
  > snippet=json
  >
  > Referrer: <http://mysite.org/civicrm/report/instance/33?reset=1&mailing_id_value=390>
  >
  > Message: Warning: array\_merge(): Expected parameter 2 to be an array,
  > null given in HTML\_QuickForm->addElement() (line 648 of
  > /home/mysite/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm.php).
  
  \_********ERROR 3********
  
  > Location: <http://mysite.org/civicrm/report/instance/33?mailing_id_value=390&>
  > qfKey=54cfb81fd804cbcd6b07435da277f9354ce7ca54fd178e9\_4603&force=1&crmPID=3&
  > snippet=json
  >
  > referrer: <http://mysite.org/civicrm/report/instance/33?reset=1&mailing_id_value=390>
  >
  > Message: Notice: Undefined index: class in HTML\_QuickForm->addElement() (line 649 of
  > /home/mysite/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm.php).
  
  5. Next, click the up arrow on the upper right of the list for going to the next page of contacts. Once again the same 3 errors above are added to the Drupal Log.
  
  [![screen shot of Drupal error log after step 4](https://i.sstatic.net/DtqX5.gif)](https://i.sstatic.net/DtqX5.gif)
  
  6. The page loads with the following form and SQL query (see image) and the up-arrow is gone from the paging. One time, the top toolbar drop-downs also stopped working.
     [![screen shot of page that loads after the first page.](https://i.sstatic.net/6kVfJ.gif)](https://i.sstatic.net/6kVfJ.gif)
  
  My question is: Why is this quickform displaying when you go to page 2 or any page past the first one? Insights, please?
  
  **Tags:** civimail, reports
  
  > **Comments:**
  > **username_1**: I can't reproduce this on the latest dev version. Perhaps it is already fixed?  
  > **username_2**: I'm having the exact same issue. **CiviCRM 5.32.2** **Wordpress 5.6** **PHP 7.2** Seems to be a problem introduced just recently as I didn't notice it a couple of patches ago. Was made aware of it by the mail_report cronjob running on the server. Got an email saying PHP Warning: array_merge(): Expected parameter 2 to be an array, null given in /var/www/wordpress/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm.php on line 648 ...and then some HTML, JS and a bit of PHP, probably from the mailing template the message is referring to.  
  > **username_3**: PHP 7.4 isn't fully supported by CiviCRM yet. The recommended version is PHP 7.3. https://docs.civicrm.org/installation/en/latest/general/requirements/#php-version  
  > **username_0**: I changed PHP 7.4 to 7.3 and it did not fix the problem.  
  
  ---
  
  ## 0 answers
  
  