Skip to content

Commit

Permalink
Merge pull request #3144 from hregis/3.7_bug3
Browse files Browse the repository at this point in the history
Fix: for avoid error with main context hooks, if hook use $langs object for example.
  • Loading branch information
eldy committed Jul 4, 2015
2 parents 4628c15 + a905924 commit 7c23dd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion htdocs/core/ajax/constantonoff.php
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2011-2012 Regis Houssin <regis.houssin@capnetworks.com>
/* Copyright (C) 2011-2015 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -26,6 +26,7 @@
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1');

require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/main.inc.php
Expand Up @@ -575,7 +575,7 @@ function analyse_sql_and_script(&$var, $type)
exit;
}
else
{
{
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('main'));

Expand Down

0 comments on commit 7c23dd1

Please sign in to comment.