cakephp/cakephp — pull request #4721 by markstory (2014-09-25 02:49:40+00:00)
Title: Fix empty collections being treated as EntityContext.

An empty collection should not fall into the EntityContext as it will cause errors downstream. Instead of just sniffing against Travserable, using a temporary Collection to access the first element will give a better test of what is in an object/array.

Fixes #4698