SugerCRM警告:从空值创建默认对象

Ani*_*man 4 editor

当我试图从sugerCRM编辑器编辑字段然后我得到这个问题.即使我尝试使用此补丁以及此错误的解决方案,但仍然遇到此问题.

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 
Run Code Online (Sandbox Code Playgroud)

小智 8

我发现其他答案几乎正确,但它产生了进一步的警告,这似乎完全解决了我们:

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

当使用现代版本的PHP时,SugarCRM会带来这样的错误,这是令人沮丧的.