Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Many AJAX requests fail because $module_dir is passed as an MBModule …

…object which cannot be converted to a string. The solution is to get the module name when applicable. Without this patch, many AJAX requests in the Module Builder break.
  • Loading branch information...
commit 5e22b7a1025a923fcc999276b59138dff13e2b5a 1 parent 68b9a68
Matt Snider authored

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. +4 0 include/utils/LogicHook.php
4 include/utils/LogicHook.php
@@ -91,6 +91,10 @@ function setBean(&$bean){
91 91 * @param SugarBean $bean
92 92 */
93 93 function call_custom_logic($module_dir, $event, $arguments = null){
  94 + if ($module_dir instanceof MBModule) {
  95 + $module_dir = (string) $module_dir->getModuleName();
  96 + }
  97 +
94 98 // declare the hook array variable, it will be defined in the included file.
95 99 $hook_array = null;
96 100 if(isset($GLOBALS['log'])){

0 comments on commit 5e22b7a

Please sign in to comment.
Something went wrong with that request. Please try again.