mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 11:32:40 +00:00
comp mod for saveAll()
better approach test case to assert saveAll still behaves like previous versions
This commit is contained in:
parent
2e15689d19
commit
1e2ac0b9c8
2 changed files with 28 additions and 2 deletions
|
@ -2017,7 +2017,7 @@ class Model extends Object implements CakeEventListener {
|
|||
* @link http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-saveassociated-array-data-null-array-options-array
|
||||
* @link http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-saveall-array-data-null-array-options-array
|
||||
*/
|
||||
public function saveAll($data, $options = array()) {
|
||||
public function saveAll($data = array(), $options = array()) {
|
||||
$options = array_merge(array('validate' => 'first'), $options);
|
||||
if (Hash::numeric(array_keys($data))) {
|
||||
if ($options['validate'] === 'only') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue