Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi everyone.

    I am no PHP expert, but it appears on line 154 when $body[‘o:tag’] is referenced, $body[‘o:tag’] is in fact undefined. Which is why what Phil said ‘worked’. However, preventing that entire body from executing could cause problems. A better workaround, I think, would be to provide the default option that line 154 wants, which is when $body[‘o:tag’] is equal to ” rather than being undefined.

    In short, go to lines 146-149 and change

    if ( isset( $mailgun['tag'] ) ){
    		$tags = explode(",", str_replace(" ","", $mailgun['tag']));
    		$body['o:tag'] = $tags;
    	}

    to

    if ( isset( $mailgun['tag'] ) ){
    		$tags = explode(",", str_replace(" ","", $mailgun['tag']));
    		$body['o:tag'] = $tags;
    	} else {
    		$body['o:tag'] = '';
    	}

    This makes sure that $body[‘o:tag’] always has a value and will not be undefined when it is referenced. Hopefully this helps!

Viewing 1 replies (of 1 total)