Skip to content

Commit

Permalink
Added warning messages in doc block for validateMany and validateAsso…
Browse files Browse the repository at this point in the history
…ciated about first param being passed by reference
  • Loading branch information
lorenzo committed May 11, 2012
1 parent 7db2b97 commit 1481f82
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/Cake/Model/Model.php
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1481f82

Please sign in to comment.