diff --git a/tests/flag_hook_test/flag_hook_test.module b/tests/flag_hook_test/flag_hook_test.module
index 169b8f0..3d5c00b 100644
--- a/tests/flag_hook_test/flag_hook_test.module
+++ b/tests/flag_hook_test/flag_hook_test.module
@@ -67,8 +67,9 @@ function flag_hook_test_flag_unflag($flag, $entity_id, $account, $flagging) {
  * Implements hook_entity_presave().
  */
 function flag_hook_test_entity_presave($entity, $type) {
+  $flagspres = func_get_args();
   if ($type == 'flagging') {
-    _flag_hook_test_record_invocation('hook_entity_presave', func_get_args(), $entity);
+    _flag_hook_test_record_invocation('hook_entity_presave', $flagspres, $entity);
   }
 }
 
@@ -76,8 +77,9 @@ function flag_hook_test_entity_presave($entity, $type) {
  * Implements hook_entity_insert().
  */
 function flag_hook_test_entity_insert($entity, $type) {
+  $flagsins = func_get_args();
   if ($type == 'flagging') {
-    _flag_hook_test_record_invocation('hook_entity_insert', func_get_args(), $entity);
+    _flag_hook_test_record_invocation('hook_entity_insert', $flagsins, $entity);
   }
 }
 
@@ -85,8 +87,9 @@ function flag_hook_test_entity_insert($entity, $type) {
  * Implements hook_entity_update().
  */
 function flag_hook_test_entity_update($entity, $type) {
+  $flagupd = func_get_args();
   if ($type == 'flagging') {
-    _flag_hook_test_record_invocation('hook_entity_update', func_get_args(), $entity);
+    _flag_hook_test_record_invocation('hook_entity_update', $flagupd, $entity);
   }
 }
 
@@ -94,8 +97,9 @@ function flag_hook_test_entity_update($entity, $type) {
  * Implements hook_entity_delete().
  */
 function flag_hook_test_entity_delete($entity, $type) {
+  $flagsdel = func_get_args();
   if ($type == 'flagging') {
-    _flag_hook_test_record_invocation('hook_entity_delete', func_get_args(), $entity);
+    _flag_hook_test_record_invocation('hook_entity_delete', $flagsdel, $entity);
   }
 }
 
