diff --git a/entity_validator.module b/entity_validator.module index 9acab35..df0e36b 100755 --- a/entity_validator.module +++ b/entity_validator.module @@ -73,7 +73,8 @@ function entity_validator_get_validator_handler($entity_type, $bundle) { $plugin = entity_validator_get_validator_plugin($plugin_name); if (!$class = ctools_plugin_load_class('entity_validator', 'validator', $plugin_name, 'class')) { - return NULL; + // We did not found any validator handler. Initialize the base handler. + return new EntityValidateBase(array(), $entity_type, $bundle); } $handler = new $class($plugin); diff --git a/includes/EntityValidateBase.php b/includes/EntityValidateBase.php index 90a41b7..f321ecb 100755 --- a/includes/EntityValidateBase.php +++ b/includes/EntityValidateBase.php @@ -3,7 +3,14 @@ /** * Abstract entity validation. */ -abstract class EntityValidateBase implements EntityValidateInterface { +class EntityValidateBase implements EntityValidateInterface { + + /** + * @var array + * + * Information about the plugin. + */ + protected $plugin; /** * The entity type. @@ -36,7 +43,7 @@ abstract class EntityValidateBase implements EntityValidateInterface { /** * Store the errors in case the error set to 0. * - * @var Array + * @var array */ protected $errors = array();