View Issue Details

IDProjectCategoryView StatusLast Update
0016784phpList 3 applicationGeneralpublic02-05-13 23:10
Reporterduncanc Assigned To 
Status resolvedResolutionfixed 
Product Version2.11.9 
Target Version2.11.10Fixed in Version2.11.10 
Summary0016784: sendAdminCopy() function tries to send to an empty email address
DescriptionThe function sendAdminCopy() tries to send to an empty email address when the configuration item admin_addresses is empty, i.e. there are no other admins to copy on the email. This error gets caught and logged in the event log.

The cause is the php explode() function which, for an empty string, returns an array of one element, not an empty array.

See file admin/lib.php line 433

    if (!sizeof($mails)) {
      $admin_mail = getConfig("admin_address");
      $mails = explode(",",getConfig("admin_addresses"));

Can be changed to

    if (!sizeof($mails)) {
      $admin_mail = getConfig("admin_address");

      if ($c = getConfig("admin_addresses")) {
        $mails = explode(",", $c);
TagsNo tags attached.



02-05-13 23:10

administrator   ~0052025

changed as suggested