Skip to content
Permalink
Browse files

Fix last occurence for instanceof check: Entity to EntityInterface.

  • Loading branch information...
skie committed Sep 21, 2015
1 parent 5de4b60 commit 03de381a1feb6643c7c9b68672ed202fa0dca9d1
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/View/Helper/FormHelper.php
@@ -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;
@@ -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'])) {

0 comments on commit 03de381

Please sign in to comment.
You can’t perform that action at this time.