Skip to content

Commit

Permalink
Fixed #1177 - added new stdClass() in order to to prevent Creating de…
Browse files Browse the repository at this point in the history
…fault object error. (#1287)
  • Loading branch information
vladbar authored and mattlorimer committed Apr 27, 2016
1 parent 1304b1b commit 79352b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/ModuleBuilder/views/view.modulefield.php
Expand Up @@ -151,6 +151,12 @@ function fetch(

VardefManager::loadVardef($moduleName, $objectName,true);
global $dictionary;

// Fix for issue #1177 - when trying to add or edit fields in a module an error message is shown:
// "Warning: Creating default object from empty value"
if(!isset($module->mbvardefs) || is_null($module->mbvardefs)) {
$module->mbvardefs = new stdClass();
}
$module->mbvardefs->vardefs = $dictionary[$objectName];

$module->name = $moduleName;
Expand Down

0 comments on commit 79352b9

Please sign in to comment.