Added warning messages in doc block for validateMany and validateAssociated about first param being passed by reference

This commit is contained in:
Jose Lorenzo Rodriguez 2012-05-10 00:05:30 -04:30
parent 7db2b97f87
commit 1481f82ec1

View file

@ -2100,6 +2100,10 @@ class Model extends Object implements CakeEventListener {
* - fieldList: Equivalent to the $fieldList parameter in Model::save() * - fieldList: Equivalent to the $fieldList parameter in Model::save()
* - deep: If set to true, all associated data will be validated as well. * - 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 $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(). * @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. * @return boolean True on success, or false on failure.
@ -2301,6 +2305,10 @@ class Model extends Object implements CakeEventListener {
* - fieldList: Equivalent to the $fieldList parameter in Model::save() * - 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. * - 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 $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(). * @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. * @return array|boolean If atomic: True on success, or false on failure.