Add type check to prevent errors related to Hash::get()

Fixes #3041
This commit is contained in:
mark_story 2012-07-23 22:33:58 -04:00
parent f926ae7637
commit 66b296527f

View file

@ -691,7 +691,7 @@ class Helper extends Object {
$data = $this->request->data;
$entity = $this->entity();
if (!empty($data) && !empty($entity)) {
if (!empty($data) && is_array($data) && !empty($entity)) {
$result = Hash::get($data, implode('.', $entity));
}