CMS MADE SIMPLE FORGE

News Module

 

[#11341] PHP notice logged when news url called without articleid

avatar
Created By: (JamesT)
Date Submitted: Fri Mar 24 21:07:57 -0400 2017

Assigned To:
Version: 2.14.1
CMSMS Version: 2.1.6
Severity: Minor
Resolution: Fixed
State: Open
Summary:
PHP notice logged when news url called without articleid
Detailed Description:
When a url from the news module is called without the cntnt01articleid
parameter, the following PHP notice is generated:

[25-Mar-2017 01:00:59 Europe/London] PHP Notice:  Undefined index: articleid in
/var/sites/m/m.co.uk/public_html/modules/News/action.detail.php on line 58

Line 58 does not check to see if the articleid parameter is available before
using it:

    if( !$article ) {
throw new CmsError404Exception('Article '.(int)$params['articleid'].'
not found, or otherwise unavailable');
        return;
    }


History

Comments
avatar
Date: 2017-06-17 13:03
Posted By: Robert Campbell (calguy1000)

now make sure that the $article variable exists 
      
avatar
Date: 2017-10-22 12:21
Posted By:  (JamesT)

Issue still exists as of CMSMS 2.2.3.1.

[22-Oct-2017 17:11:31 Europe/London] PHP Notice:  Undefined index: articleid in
/var/sites/m/m.co.uk/public_html/modules/News/action.detail.php on line 57

Line 57 does not check to see if the articleid parameter is available before
using it:

    if( !$article ) {
throw new CmsError404Exception('Article '.(int)$params['articleid'].'
not found, or otherwise unavailable');
        return;
    }
      
Updates

Updated: 2017-06-17 13:03
resolution_id: => 7