Page 1 of 1
News module PHP errors
Posted: Wed Jan 11, 2017 1:46 pm
by JamesT
When this URL is visited:
Code: Select all
http://www.example.com/index.php?mact=News,cntnt01,detail,0
A PHP error is generated:
Code: Select all
[11-Jan-2017 13:37:30 Europe/London] PHP Notice: Undefined index: articleid in /var/sites/m/m.co.uk/public_html/modules/News/action.detail.php on line 58
In my opinion, PHP errors should not be generated as a result of visitor actions, the code should be written to see the potential eventualities and mitigate them. In this instance, a bot repeating such requests can flood the PHP error log with notices.
Re: News module PHP errors
Posted: Wed Jan 11, 2017 2:25 pm
by Rolf
This is a server setting, not cmsms related
Re: News module PHP errors
Posted: Wed Jan 11, 2017 2:31 pm
by JamesT
Ok. But in my opinion, calling undefined indexes is bad coding practice.
Re: News module PHP errors
Posted: Thu Jan 12, 2017 7:50 am
by chandra
You should add module version you are using...
Re: News module PHP errors
Posted: Thu Jan 12, 2017 11:44 am
by JamesT
I always use the latest of everything when it comes to CMSMS, in this case it's News 2.50.6. The code probably needs nothing more than a simple isset to prevent the PHP errors appearing.
Re: News module PHP errors
Posted: Thu Jan 12, 2017 12:54 pm
by chandra
JamesT wrote:The code probably needs nothing more than a simple isset to prevent the PHP errors appearing.
Ok.
It seems you are familiar with such problems. CMSMS lives from the help of the community. So it would be nice to post a bug report, maybe with your solution
http://dev.cmsmadesimple.org/bug/list/8
Thank you!
Re: News module PHP errors
Posted: Thu Jan 12, 2017 1:28 pm
by JamesT
Thanks.
I notice on the News module bug submission form the latest version on the dropdown is 2.14.1. Is this still the correct page to submit News module bugs or should it be done on the CMS Made Simple Core page (because it's a core module)?
Re: News module PHP errors
Posted: Fri Jan 13, 2017 9:34 am
by chandra
If there's a possibility to add a bug report to a special module you should do it there.
Core bug list is only for main core without modules.
Haven't heared about other rules.