mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #3250 from dereuromark/2.5-hash
Use Hash instead of Set class
This commit is contained in:
commit
8d47ef43e5
1 changed files with 2 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
App::uses('View', 'View');
|
App::uses('View', 'View');
|
||||||
App::uses('Xml', 'Utility');
|
App::uses('Xml', 'Utility');
|
||||||
|
App::uses('Hash', 'Utility');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A view class that is used for creating XML responses.
|
* A view class that is used for creating XML responses.
|
||||||
|
@ -124,7 +125,7 @@ class XmlView extends View {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$data = isset($this->viewVars[$serialize]) ? $this->viewVars[$serialize] : null;
|
$data = isset($this->viewVars[$serialize]) ? $this->viewVars[$serialize] : null;
|
||||||
if (is_array($data) && Set::numeric(array_keys($data))) {
|
if (is_array($data) && Hash::numeric(array_keys($data))) {
|
||||||
$data = array($rootNode => array($serialize => $data));
|
$data = array($rootNode => array($serialize => $data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue