Skip to content
Permalink
Browse files

Added warning messages in doc block for validateMany and validateAsso…

…ciated about first param being passed by reference
  • Loading branch information...
lorenzo committed May 10, 2012
1 parent 0fb025f commit 00a34f14fe49940ccb13ce9f1bde5c27b61d9362
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/Cake/Model/Model.php
@@ -2100,6 +2100,10 @@ public function saveMany($data = null, $options = array()) {
* - fieldList: Equivalent to the $fieldList parameter in Model::save()
* - deep: If set to true, all associated data will be validated as well.
*
* Warning: This method could potentially change the passed argument `$data`,
* If you do not want this to happen, make a copy of `$data` before passing it
* to this method
*
* @param array $data Record data to validate. This should be a numerically-indexed array
* @param array $options Options to use when validating record data (see above), See also $options of validates().
* @return boolean True on success, or false on failure.
@@ -2301,6 +2305,10 @@ public function saveAssociated($data = null, $options = array()) {
* - fieldList: Equivalent to the $fieldList parameter in Model::save()
* - deep: If set to true, not only directly associated data , but deeper nested associated data is validated as well.
*
* Warning: This method could potentially change the passed argument `$data`,
* If you do not want this to happen, make a copy of `$data` before passing it
* to this method
*
* @param array $data Record data to validate. This should be an array indexed by association name.
* @param array $options Options to use when validating record data (see above), See also $options of validates().
* @return array|boolean If atomic: True on success, or false on failure.

0 comments on commit 00a34f1

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.