Skip to content

Commit

Permalink
Merge pull request #160 from zf-fr/dont-restrict-plugin
Browse files Browse the repository at this point in the history
Don't prevent plugin usage
  • Loading branch information
bakura10 committed May 5, 2014
2 parents feb0929 + 9adafdc commit 66d2e30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ZfrRest/Mvc/Controller/Plugin/ResourceModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ResourceModel extends AbstractPlugin
*/
public function __invoke($data, ResourceMetadataInterface $resourceMetadata = null)
{
if (!$this->controller instanceof AbstractRestfulController) {
if (null === $resourceMetadata && !$this->controller instanceof AbstractRestfulController) {
throw new RuntimeException(
'You tried to use the ResourceModel controller plugin on a controller instance that does
not extend "ZfrRest\Mvc\Controller\AbstractRestfulController"'
Expand Down

0 comments on commit 66d2e30

Please sign in to comment.