Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix last occurence for instanceof check: Entity to EntityInterface.
  • Loading branch information
skie committed Sep 21, 2015
1 parent 5de4b60 commit 03de381
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/View/Helper/FormHelper.php
Expand Up @@ -17,6 +17,7 @@
use Cake\Collection\Collection;
use Cake\Core\Configure;
use Cake\Core\Exception\Exception;
use Cake\Datasource\EntityInterface;
use Cake\Form\Form;
use Cake\ORM\Entity;
use Cake\Routing\Router;
Expand Down Expand Up @@ -266,7 +267,7 @@ protected function _addDefaultContextProviders()
return new EntityContext($request, $data);
}
}
if ($data['entity'] instanceof Entity) {
if ($data['entity'] instanceof EntityInterface) {
return new EntityContext($request, $data);
}
if (is_array($data['entity']) && empty($data['entity']['schema'])) {
Expand Down

0 comments on commit 03de381

Please sign in to comment.