mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Removing params() it was a pretty much useless function, and was deprecated.
This commit is contained in:
parent
84002687c8
commit
d926a379b4
2 changed files with 0 additions and 34 deletions
|
@ -204,23 +204,6 @@ if (!function_exists('sortByKey')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Display parameters.
|
|
||||||
*
|
|
||||||
* @param mixed $p Parameter as string or array
|
|
||||||
* @return string
|
|
||||||
* @deprecated Will be removed in 2.0
|
|
||||||
*/
|
|
||||||
function params($p) {
|
|
||||||
if (!is_array($p) || count($p) == 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (is_array($p[0]) && count($p) == 1) {
|
|
||||||
return $p[0];
|
|
||||||
}
|
|
||||||
return $p;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merge a group of arrays
|
* Merge a group of arrays
|
||||||
*
|
*
|
||||||
|
|
|
@ -582,23 +582,6 @@ class BasicsTest extends CakeTestCase {
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* test params()
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function testParams() {
|
|
||||||
$this->assertNull(params('weekend'));
|
|
||||||
$this->assertNull(params(array()));
|
|
||||||
$this->assertEqual(params(array('weekend')), array('weekend'));
|
|
||||||
|
|
||||||
$nested = array(array('weekend'));
|
|
||||||
$this->assertEqual(params($nested), array('weekend'));
|
|
||||||
|
|
||||||
$multiple = array(array('weekend'), 'jean-luc', 'godard');
|
|
||||||
$this->assertEqual(params($multiple), $multiple);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test stripslashes_deep()
|
* test stripslashes_deep()
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue