XF 2.1 ErrorException: [E_NOTICE] Undefined variable: content

ActorMike

Well-known member
Our Server error log is getting blown up with this message which appears to be from the bounce log.

  • ErrorException: [E_NOTICE] Undefined variable: content
  • src\XF\EmailBounce\Processor.php:64
  • Generated by: Unknown account
  • Nov 23, 2019 at 9:53 AM
What can we do to resolve it? Thanks.
 
After closer examination, it does not appear the bounce handler is working properly after the upgrade to XF2. The recipient field is totally blank on the logs. See below. It worked fine in XF1.5.

bounce-log.webp
 
Solution-
ErrorException: [E_NOTICE] Undefined variable: content src\XF\EmailBounce\Processor.php:64

The problem was there was no email specified in the mail server for the return path which apparently throws the PHP error.
Return-Path: <>
Your old code for XF1.5 did not cause this undefined variable PHP error.

We added an email address for return-path and now the bounce handler processes the messages without a PHP error.
 
Yeah I get that, the thing is my bounce processing is working fine, except for a few cases where there doesn't appear to be an email address. See screenshot, these are the ones I'm getting the errors for, the "unknown" ones.

screenshot-www.marineaquariumsa.com-2020.08.02-16_26_35.webp
 
Yeah I get that, the thing is my bounce processing is working fine, except for a few cases where there doesn't appear to be an email address. See screenshot, these are the ones I'm getting the errors for, the "unknown" ones.

View attachment 231835
We've had our forum since 2001. I went into our MYSQL database and sorted our users by email and found about 10 were blank. Removed all of them.
 
Top Bottom