Problem in sending mail (ask question page)

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
fbunadi
Posts: 4
Joined: Thu Jan 12, 2012 12:30 am

Problem in sending mail (ask question page)

Post by fbunadi »

Hi,

I always get ajax error message "json is null" in ask question page whenever
1. I asked question that doesn't exist in the faq yet
2. if I clicked on submit button again after the faq result is displayed

I've checked the configuration and I've put the administration mail address.

Any idea why this is happening?
fbunadi
Posts: 4
Joined: Thu Jan 12, 2012 12:30 am

Re: Problem in sending mail (ask question page)

Post by fbunadi »

Never mind, I found the error.

It's in the PMF_Mail_IMUA class and PMF_Mail_Builtin class.

Builtin class implements interface IMUA however the headers param in send function in IMUA (interface) doesn't have to be specifically an array whereas the builtin class asking specifically for an array for the header params

Code: Select all

interface PMF_Mail_IMUA
{
public function send($recipients, $headers, $body);
}

Code: Select all

class PMF_Mail_Builtin implements PMF_Mail_IMUA
{
public function send($recipients, Array $headers, $body)
    { ... }
}
Either you add 'Array' in the IMUA send function or remove the 'Array' from Builtin send function will solve the problem.
Thorsten
Posts: 15815
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Problem in sending mail (ask question page)

Post by Thorsten »

Hi,

this was fixed in 2.7.3: https://github.com/thorsten/phpMyFAQ/co ... 3498e58055

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply