ElkArte Community

Elk Development => Bug Reports => Topic started by: kode54 on July 04, 2019, 01:19:24 am

Title: [1.1.5] Cannot edit an existing ban trigger
Post by: kode54 on July 04, 2019, 01:19:24 am
This is after applying the fix from my previous bug report about ban triggers. It mentions something about invalid arguments to a foreach().

I was attempting to fix an email ban trigger, which was set to just the domain, instead of *@domain
Title: Re: [1.1.5] Cannot edit an existing ban trigger
Post by: Spuds on July 04, 2019, 03:52:56 am
@kode54

If you could edit ManageBans.controller.php (in sources/admin) line 806

Code: (current) [Select]
			$dummy['ban_suggestions'] = array_shift($this->_req->post->ban_suggestions);
Code: (new) [Select]
			$dummy['ban_suggestions'] = (array) array_shift($this->_req->post->ban_suggestions);

Just adding that (array) and let me know if that fixes the problem and if you see any other side effects.

Thanks
Title: Re: [1.1.5] Cannot edit an existing ban trigger
Post by: emanuele on July 04, 2019, 08:01:09 am
Let's keep #3320 open until this is fixed?
Title: Re: [1.1.5] Cannot edit an existing ban trigger
Post by: Spuds on July 04, 2019, 02:53:53 pm
Agree, I'll add the above fix to the PR, I think that will be all that is needed but will wait for kode54 to confirm.