Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SugerCRM Warning: Creating default object from empty value

Tags:

editor

when i am trying to edit field from sugerCRM editor then i am getting this issue. even i try to use this patch as well as a solution for this error but still getting this issue.

https://github.com/sugarcrm/sugarcrm_dev/pull/143

( ! ) Warning: Creating default object from empty value in C:\xampp\htdocs\crm\trunk\modules\ModuleBuilder\views\view.modulefield.php on line 151 
like image 827
Anil Kumar Avatar asked Dec 15 '22 03:12

Anil Kumar


1 Answers

I found the other answer almost correct but it generated further warnings, this seemed to solve them completely for me:

if(!isset($module->mbvardefs) || is_null($module->mbvardefs)) {
    $module->mbvardefs = new stdClass();
}
$module->mbvardefs->vardefs =  $dictionary[$objectName]; 

It is kind of frustrating that SugarCRM comes with bugs like this when using modern versions of PHP..

like image 136
xenos Avatar answered Feb 19 '23 13:02

xenos