News module PHP errors

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

News module PHP errors

Post 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.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: News module PHP errors

Post by Rolf »

This is a server setting, not cmsms related
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: News module PHP errors

Post by JamesT »

Ok. But in my opinion, calling undefined indexes is bad coding practice.
chandra

Re: News module PHP errors

Post by chandra »

You should add module version you are using...
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: News module PHP errors

Post 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.
chandra

Re: News module PHP errors

Post 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!
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: News module PHP errors

Post 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)?
chandra

Re: News module PHP errors

Post 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.
Post Reply

Return to “The Lounge”