diff --git a/src/ParamConverter/DbConverter.php b/src/ParamConverter/DbConverter.php index 792e336..b644496 100644 --- a/src/ParamConverter/DbConverter.php +++ b/src/ParamConverter/DbConverter.php @@ -58,6 +58,10 @@ class DbConverter implements ParamConverterInterface { * {@inheritdoc} */ public function applies($definition, $name, Route $route) { - return ($definition['type'] == 'relaxed:db'); + if (!empty($definition['type']) && $definition['type'] == 'relaxed:db') { + return TRUE; + } + return FALSE; } + } diff --git a/src/ParamConverter/DocIdConverter.php b/src/ParamConverter/DocIdConverter.php index 1af028c..c7827d0 100644 --- a/src/ParamConverter/DocIdConverter.php +++ b/src/ParamConverter/DocIdConverter.php @@ -132,6 +132,10 @@ class DocIdConverter implements ParamConverterInterface { * {@inheritdoc} */ public function applies($definition, $name, Route $route) { - return ($definition['type'] == 'relaxed:docid'); + if (!empty($definition['type']) && $definition['type'] == 'relaxed:docid') { + return TRUE; + } + return FALSE; } + }