mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
fixing Set::extract()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3645 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
1c1bc8bfa8
commit
294bf20624
1 changed files with 5 additions and 2 deletions
|
@ -173,9 +173,12 @@ class Set extends Object {
|
||||||
* @uses NeatArray::value
|
* @uses NeatArray::value
|
||||||
*/
|
*/
|
||||||
function extract($array, $name = null) {
|
function extract($array, $name = null) {
|
||||||
if(!is_array($array)) {
|
if(!empty($array)) {
|
||||||
$name = $array;
|
$name = $array;
|
||||||
$array = $this->get();
|
$array = $this->_value;
|
||||||
|
}
|
||||||
|
if(empty($array)) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
$out = array();
|
$out = array();
|
||||||
foreach($array as $val) {
|
foreach($array as $val) {
|
||||||
|
|
Loading…
Reference in a new issue