Additional safety catch for the new extract function

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6587 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
the_undefined 2008-03-16 23:09:21 +00:00
parent 0aebf2b50a
commit 2dc63c7bc7

View file

@ -383,7 +383,7 @@ class Set extends Object {
* @access public
*/
function extract($path, $data = null, $options = array()) {
if (is_array($path) || empty($data) || is_object($path)) {
if (is_array($path) || empty($data) || is_object($path) || empty($path)) {
return Set::classicExtract($path, $data);
}
$contexts = $data;