CMS MADE SIMPLE FORGE

CGBlog

 

[#11623] Call to a member function MemberOfGroup() on null after FEU uninstall

avatar
Created By: Tristan (tristan)
Date Submitted: Tue Oct 31 09:55:47 -0400 2017

Assigned To:
Version: 1.15.5
CMSMS Version: 2.2.3.1
Severity: Major
Resolution: Fixed
State: Open
Summary:
Call to a member function MemberOfGroup() on null after FEU uninstall
Detailed Description:
This code in CGBlog/action.default.php:

    $feu = cge_utils::get_module('FrontEndUsers');
    $gid = $this->GetPreference('fesubmit_draftviewers',-1);
    if( $gid > 0 ) {
if( $feu->MemberOfGroup($feu->LoggedInId(),$gid) ) $showdraft =
\cge_param::get_bool($params,'showdraft');
    }

Doesn't work as expected when you've set some "Frontend Blog Submit Options" in
CGBlog and afterwards uninstall FEU. The CGBlog_mapi_pref_fesubmit_draftviewers
field will still be set at 1 in the DB but $feu will be empty thus resulting in
a:

PHP Fatal error:  Uncaught Error: Call to a member function MemberOfGroup() on
null in
/home/tristan/domains/tsirt.nl.nl/public_html/modules/CGBlog/action.default.php:57\nStack
trace:\n#0
/home/tristan/domains/tsirt.nl.nl/public_html/lib/classes/class.CMSModule.php(1415):
include()\n#1
/home/tristan/domains/tsirt.nl.nl/public_html/modules/CGExtensions/CGExtensions.module.php(621):
CMSModule->DoAction('default', 'm899c2', Array, '33')\n#2
/home/tristan/domains/tsirt.nl.nl/public_html/lib/classes/class.CMSModule.php(1489):
CGExtensions->DoAction('default', 'm899c2', Array, '33')\n#3
/home/tristan/domains/tsirt.nl.nl/public_html/lib/module.functions.php(106):
CMSModule->DoActionBase('default', 'm899c2', Array, '33',
Object(CMS_Smarty_Template))\n#4
/home/tristan/domains/tsirt.nl.nl/public_html/lib/classes/class.CMSModule.php(270):
cms_module_plugin(Array, Object(CMS_Smarty_Template))\n#5
/home/tristan/domains/tsirt.nl.nl/public_html/tmp/templates_c/33content_en^62e936251e4799749e89fa9828a0ee7332eb5816_0.conte
in
/home/tristan/domains/tsirt.nl.nl/public_html/modules/CGBlog/action.default.php
on line 57, referer: https://www.tsirt.nl.nl/

Maybe you could add an extra check for an installed FEU instance?


History

Comments
avatar
Date: 2017-10-31 20:23
Posted By: Robert Campbell (calguy1000)

Fixed in svn, thanks
      
Updates

Updated: 2017-10-31 20:23
resolution_id: => 7