CMS MADE SIMPLE FORGE

Frontend Users

 

[#12401] Fatal error: Uncaught TypeError:

avatar
Created By: Balazs (qpress)
Date Submitted: Tue Dec 22 13:02:07 -0500 2020

Assigned To: Robert Campbell (calguy1000)
Version: 3.2.2
CMSMS Version: 2.2.15
Severity: Major
Resolution: None
State: Open
Summary:
Fatal error: Uncaught TypeError:
Detailed Description:
When I imported users with the Frontend User Management Module I got this error
message:

Fatal error: Uncaught TypeError: trim() expects parameter 1 to be string, null
given in
/home/qp/public_html/teszt/modules/CGExtensions/CGExtensions.module.php:1683
Stack trace: #0
/home/qp/public_html/teszt/modules/CGExtensions/CGExtensions.module.php(1683):
trim(NULL) #1
/home/qp/public_html/teszt/modules/FrontEndUsers/action.admin_import_users.php(45):
CGExtensions->CGGetPreference('importprefs') #2
/home/qp/public_html/teszt/lib/classes/class.CMSModule.php(1403):
include('/home/qp/public...') #3
/home/qp/public_html/teszt/modules/CGExtensions/CGExtensions.module.php(623):
CMSModule->DoAction('admin_import_us...', 'm1_', Array, '') #4
/home/qp/public_html/teszt/lib/classes/class.CMSModule.php(1479):
CGExtensions->DoAction('admin_import_us...', 'm1_', Array, '') #5
/home/qp/public_html/teszt/admin/moduleinterface.php(74):
CMSModule->DoActionBase('admin_import_us...', 'm1_', Array, '',
Object(Smarty_CMS)) #6 {main} thrown in
/home/qp/public_html/teszt/modules/CGExtensions/CGExtensions.module.php on line
1683


PHP version 7.2.24
FrontEndUsers 3.2.2
CGExtensions 1.65.2

Can somebody help me?


History

Comments
avatar
Date: 2021-07-16 12:20
Posted By: Chris Taylor (chrisbt)

BUG fix for Import Users & too use alternative delimiters

action.admin_import_users.php - line 51
//  MOD - to fix bug - when first called 'importprefs' does not exist, CGE
generates fatal error
    //$tmp = $this->CGGetPreference('importprefs');
    $tmp = $this->GetPreference('importprefs', '');
// end of  MOD


also to use alternative delimiters: action.admin_doimport.php line 149:
        //  MOD - use defined delimiter
        $rec = fgetcsv($fh, 0, $importprefs['delimiter']);
      
Updates

Updated: 2020-12-23 01:52
resolution_id: => 5
assigned_to_id: 100 => 106