You are running this on an version of PHP where you are no longer
supposed to define pass_by_reference in functions like before. LIke
the error said you can allow it in php.ini or fix the behaviour. From
a quick glance I'd say you could safely remove them since decrypt() is
defined to accept the arguments as references.
$this->decrypt(&$model, &$result);
See the two & there.
/Martin
On Sep 26, 2:43 pm, Kanten <anders.ho...@gmail.com> wrote:
> Hi,
>
> I'm experimenting with the cipher behavior:http://bakery.cakephp.org/articles/view/cipher-behavior
>
> Unfortunately I keep getting the following error and can't seem to
> figure out how to debug the script myself:
>
> Warning: Call-time pass-by-reference has been deprecated; If you would
> like to pass it by reference, modify the declaration of [runtime
> function name](). If you would like to enable call-time pass-by-
> reference, you can set allow_call_time_pass_reference to true in your
> INI file in C:\wamp\www\cake\app\models\behaviors\cipher.php on line
> 90
>
> The code section corresponding to this is:
>
> /** Model hook to decrypt model data if auto decipher is turned on in
> the
> * model behavior configuration. Only primary model data are
> decrypted. */
> function afterFind(&$model, $result, $primary = false) {
> if (!$result || !isset($this->config[$model->name]['cipher']))
> return $result;
>
> if ($primary && $this->config[$model->name]['autoDecrypt']) {
> // check for single of multiple model
> $keys = array_keys($result);
> if (!is_numeric($keys[0])) {
> $this->decrypt(&$model, &$result);
> } else {
> foreach($keys as $index) {
> $this->decrypt(&$model, &$result[$index]);
> }
> }
> }
> return $result;
> }
>
> Any ideas?
>
> /Anders
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment