Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion entity_validator.module
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
11 changes: 9 additions & 2 deletions includes/EntityValidateBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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();

Expand Down