Bug when name is not set

Phoca Email (Newsletter) - sending emails and managing newsletters in Joomla! CMS
tr4kx
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 27 Mar 2019, 23:11

Bug when name is not set

Post by tr4kx »

Hi,

Thanks for your great job. Newsletter component works well. I just found a small bug with the component and joomla 3.

If subscriber has not set its name, trying to unsubscribe leads to an error message. But the user is unsubscribed successfully.
I the user set its name, no more bug...

Thank you.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48416
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Bug when name is not set

Post by Jan »

Hi, thank you for the info, I will take a look at it for the next version.

Thank you, Jan
If you find Phoca extensions useful, please support the project
tr4kx
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 27 Mar 2019, 23:11

Re: Bug when name is not set

Post by tr4kx »

Hi Jan,

During unsubscribe, there a test checking if the variable with the name is not empty. Remove this check could remove the bug.
File to modify is /administrator/components/com_phocaemail/helpers/phocaemailsendnewsletteremail.php

Change line n°262:

Code: Select all

if ($rows > 0 && isset($subscriber->name) && isset($subscriber->email) && $subscriber->name != '' && $subscriber->email != '')  {
with

Code: Select all

if ($rows > 0 && isset($subscriber->name) && isset($subscriber->email) && $subscriber->email != '')  {
Not sure it's the best way but it works. I hope it'll help.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48416
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Bug when name is not set

Post by Jan »

Hi, thank you very much for the info, I will revise it for next version.

Thank you, Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48416
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Bug when name is not set

Post by Jan »

If you find Phoca extensions useful, please support the project
Post Reply