I tried running the query manually with $this->Message->query() and the same happens, it will work correctly when a value is not encrypted or with a hardcoded value, but will not work with encrypted values, it leaves that field in the database empty.
On Nov 12, 7:57 pm, laduree <[email protected]> wrote: > I did that and the data is there, if I hardcode a value it is entered > correctly in the database, if I don't encrypt it it is entered > correctly as well. It seems mysql is just not accepting the encrypted > string. > > // After: > // if(!empty($this->data)) { > // die(debug($this->data)); > [Message] => Array > ( > [to] => [email protected] > [msg] => This is a string > ) > > // After: > // if($this->Message->save($this->data)){ > // die(debug($this->data)); > [Message] => Array > ( > [to] => [email protected] > [msg] => ÙYÃu`ï·۹ñ$!ó] > [user_id] => 1 > ) > > On Nov 12, 7:46 pm, cricket <[email protected]> wrote: > > > > > > > > > On Fri, Nov 12, 2010 at 1:13 PM, laduree <[email protected]> wrote: > > > I tried using Security::cipher and the same thing happened with the > > > same SQL output. > > > > The weirdest thing is that the data is not going missing at any point > > > as I had passed it to the view using $this->set() both before and > > > after encryption with the following result: > > > > Message: This string will be encrypted > > > Encrypted message: T j/ ު l3 ] *RS I+ } Wl > > > Try: > > > if(!empty($this->data)) { > > die(debug($this->data)); Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
