MantisBT: master bc4db082

Author Committer Branch Timestamp Parent
dregad dregad master 2025-12-13 10:17 master 41ba2aa9
Affected Issues  0036786: Calling email API functions from CLI triggers PHP warning
Changeset

Fix PHP Warning in email API from CLI

Email API functions that generate an email body including the user's IP
address throw a SYSTEM WARNING: 'Undefined array key "REMOTE_ADDR"' when
called from CLI:

  • email_send_confirm_hash_url(),
  • email_send_email_verification_url
  • email_notify_new_account()

Updating code to return "unknown" if $_SERVER('REMOTE_ADDR') is not set.

Fixes 0036786

mod - core/email_api.php Diff File