--- //devtocoya/Data/www/dev.ecommerce.ouest-france.fr/sites/all/modules/contrib/features/features.api.php.old	Fri Nov 02 21:51:26 2012
+++ //devtocoya/Data/www/dev.ecommerce.ouest-france.fr/sites/all/modules/contrib/features/features.api.php	Thu Nov 08 18:31:40 2012
@@ -398,7 +398,7 @@
  * @param $component
  *   String name of the component that is about to be reverted.
  */
-function hook_pre_features_revert($component) {
+function hook_pre_features_revert($component = null) {
 }
 
 /**
@@ -408,7 +408,7 @@
  * @param $component
  *   String name of the component that has just been reverted.
  */
-function hook_post_features_revert($component) {
+function hook_post_features_revert($component = null) {
 }
 
 /**
@@ -418,7 +418,7 @@
  * @param $component
  *   String name of the component that is about to be rebuilt.
  */
-function hook_pre_features_rebuild($component) {
+function hook_pre_features_rebuild($component = null) {
 }
 
 /**
@@ -428,7 +428,7 @@
  * @param $component
  *   String name of the component that has just been rebuilt.
  */
-function hook_post_features_rebuild($component) {
+function hook_post_features_rebuild($component = null) {
 }
 
 /**
@@ -438,7 +438,7 @@
  * @param $component
  *   String name of the component that is about to be disabled.
  */
-function hook_pre_features_disable_feature($component) {
+function hook_pre_features_disable_feature($component = null) {
 }
 
 /**
@@ -448,7 +448,7 @@
  * @param $component
  *   String name of the component that has just been disabled.
  */
-function hook_post_features_disable_feature($component) {
+function hook_post_features_disable_feature($component = null) {
 }
 
 /**
@@ -458,7 +458,7 @@
  * @param $component
  *   String name of the component that is about to be enabled.
  */
-function hook_pre_features_enable_feature($component) {
+function hook_pre_features_enable_feature($component = null) {
 }
 
 /**
@@ -468,7 +468,7 @@
  * @param $component
  *   String name of the component that has just been enabled.
  */
-function hook_post_features_enable_feature($component) {
+function hook_post_features_enable_feature($component = null) {
 }
 
 /**
--- //devtocoya/Data/www/dev.ecommerce.ouest-france.fr/sites/all/modules/contrib/features/features.module.old	Thu Nov 08 18:20:04 2012
+++ //devtocoya/Data/www/dev.ecommerce.ouest-france.fr/sites/all/modules/contrib/features/features.module	Thu Nov 08 18:30:31 2012
@@ -876,10 +876,12 @@
     }
   }
 
+  $pre_hook = 'pre_' . $restore_hook;
+  $post_hook = 'post_' . $restore_hook;
   foreach ($items as $module_name => $components) {
+    module_invoke($module_name, $pre_hook, null);
     foreach ($components as $component) {
       // Invoke pre hook
-      $pre_hook = 'pre_' . $restore_hook;
       module_invoke($module_name, $pre_hook, $component);
 
       if (features_hook($component, $restore_hook)) {
@@ -895,9 +897,9 @@
       }
 
       // Invoke post hook
-      $post_hook = 'post_' . $restore_hook;
       module_invoke($module_name, $post_hook, $component);
     }
+    module_invoke($module_name, $post_hook, null);
   }
 }
 
