BlackCatDevelopment / BlackCatCMS

BlackCat CMS is a PHP5, HTML5 content management system
https://blackcat-cms.org
Other
11 stars 9 forks source link

Logical error in Addons.php #331

Closed webbird closed 8 years ago

webbird commented 8 years ago

In method getModuleUsage() there's this code snippet:

                // skip negative page id's
                if ( substr( $usage[$i]['page_id'], 0, 1 ) == '-' )
                    unset($usage[$i]);
                $usage[$i]['page_link']  = CAT_Helper_Page::getLink($usage[$i]['page_id']);
                $usage[$i]['menu_title'] = CAT_Helper_Page::properties($usage[$i]['page_id'],'menu_title');

Apart from negative page ID's, there's no sense in using $usage[$i] after unsetting it...