Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #42134, comment 9


Ignore:
Timestamp:
06/07/2019 12:20:45 PM (6 years ago)
Author:
jipmoors
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #42134, comment 9

    initial v1  
    11Looking at the code I'm seeing some places that can be improved. As this is a stand-alone function better checking for unexpected situation will improve functionality.
    22
    3 - get_userdata can return unexpected data, as the user ID doesn't have to be valid
    4 - $admin_notification is being determined using a filter, which can return an empty value; an email should not be send if there is no message
     3- `get_userdata` can return unexpected data, as the user ID doesn't have to be valid
     4- `$admin_notification` is being determined using a filter, which can return an empty value; an email should not be send if there is no message
    55
    66Site tite:
     
    99
    1010Some other concern I noticed:
    11 The admin_email will be default in this patch to: 'support@' . $_SERVER['SERVER_NAME']
     11The admin_email will be default in this patch to: `'support@' . $_SERVER['SERVER_NAME']`
    1212But support is not a default emailbox. Suggesting to use "postmaster" or even considering of returning a WP_Error and not sending an email at all.