Skip to content

Commit

Permalink
Take care of empty hooks in the db
Browse files Browse the repository at this point in the history
Signed-off-by: emanuele <emanuele45@gmail.com>
  • Loading branch information
emanuele45 committed Mar 15, 2014
1 parent eebb4f8 commit 4daef7d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sources/Subs.php
Expand Up @@ -3960,7 +3960,11 @@ function remove_integration_function($hook, $function, $file = '')
}

if (in_array($integration_call, $current_functions))
{
updateSettings(array($hook => implode(',', array_diff($current_functions, array($integration_call)))));
if (empty($modSettings[$hook]))
removeSettings($hook);
}
}

// Turn the function list into something usable.
Expand Down

0 comments on commit 4daef7d

Please sign in to comment.