diff -Naur a/entity_bundle_plugin.info b/entity_bundle_plugin.info
--- a/entity_bundle_plugin.info	2013-07-01 19:05:57.000000000 +1000
+++ b/entity_bundle_plugin.info	2014-06-20 15:55:28.000000000 +1000
@@ -2,7 +2,7 @@
 description = "Provide supports for entity types which bundles are plugin classes."
 package = Entity
 core = 7.x
-php = 5.3
+;php = 5.3

 dependencies[] = entity
 dependencies[] = ctools
diff -Naur a/entity_bundle_plugin.module b/entity_bundle_plugin.module
--- a/entity_bundle_plugin.module	2013-06-29 12:54:41.000000000 +1000
+++ b/entity_bundle_plugin.module	2014-08-06 16:51:05.000000000 +1000
@@ -31,6 +31,18 @@
   }
 }

+
+function _entity_bundle_plugin_anon_fn_1($plugin) {
+  $r = new ReflectionClass($plugin['class']);
+  $ret = !$r->implementsInterface('EntityBundlePluginValidableInterface')
+    || call_user_func(array($plugin['class'], 'isValid'));
+  return $ret;
+}
+
+function _entity_bundle_plugin_anon_fn_2(&$value) {
+  $value = ($value !== FALSE) ? (string) $value : '0';
+}
+
 /**
  * Rebuild the fields for a given entity type.
  *
@@ -42,12 +54,7 @@
   // Load the bundle plugins.
   ctools_include('plugins');
   $plugins = ctools_get_plugins($entity_info['module'], $entity_info['bundle plugin']['plugin type']);
-  $plugins = array_filter($plugins, function ($plugin) {
-    $r = new ReflectionClass($plugin['class']);
-    $ret = !$r->implementsInterface('EntityBundlePluginValidableInterface')
-      || call_user_func(array($plugin['class'], 'isValid'));
-    return $ret;
-  });
+  $plugins = array_filter($plugins, '_entity_bundle_plugin_anon_fn_1');
   uasort($plugins, 'ctools_plugin_sort');

   // Process the bundle plugins and extract the fields they define.
@@ -86,8 +93,8 @@
       $field = _entity_bundle_plugin_array_merge_deep_array(array($existing_field, $field));

       // Recursively cast to string for a sane comparison.
-      array_walk_recursive($existing_field, function (&$value) { $value = ($value !== FALSE) ? (string) $value : '0'; });
-      array_walk_recursive($field, function (&$value) { $value = ($value !== FALSE) ? (string) $value : '0'; });
+      array_walk_recursive($existing_field, '_entity_bundle_plugin_anon_fn_2');
+      array_walk_recursive($field, '_entity_bundle_plugin_anon_fn_2');

       if (serialize($existing_field) != serialize($field)) {
         field_update_field($field);
@@ -114,8 +121,8 @@
         $instance = _entity_bundle_plugin_array_merge_deep_array(array($existing_instance, $instance));

         // Recursively cast to string for a sane comparison.
-        array_walk_recursive($existing_instance, function (&$value) { $value = ($value !== FALSE) ? (string) $value : '0'; });
-        array_walk_recursive($instance, function (&$value) { $value = ($value !== FALSE) ? (string) $value : '0'; });
+        array_walk_recursive($existing_instance, '_entity_bundle_plugin_anon_fn_2');
+        array_walk_recursive($instance, '_entity_bundle_plugin_anon_fn_2');

         if (serialize($existing_instance) != serialize($instance)) {
           field_update_instance($instance);
