0
I’m starting to use CakePhp
, when I register something, it returns the following errors:
Warning (2): Illegal string offset 'key' [CORE Cake View Helper Sessionhelper.php, line 143]
Warning (2): Illegal string offset 'message' [CORE Cake View Helper Sessionhelper.php, line 167]
But registered in the bank.
What is the code that generates the error?
– Woss
I did the CRUD by Bake in cmd, and at the time I will register, edit or delete it returns this error. the error function is this: public Function flash($key = 'flash', $attrs = array()) { $out = false; if (Cakesession::check('Message.' . $key)) { $flash = Cakesession::read('Message.' . $key); Cakesession::delete('Message.' . $key); $out = ''; foreach ($flash as $flashArray) { if (!Empty($attrs)) { $flashArray = merge($flashArray, $attrs); } $flashArray['key'] = $key; $out .= $this->_render($flashArray); } } Return $out; }
– silas santos
Silas, pay attention, do all that I say in this order and fail none of the items: 1. edit (click on the link above called edit) the question and speaks exactly as you did, step by step - 2. inform the PHP version, 3. inform the cakephp version, 4. inform us if you have installed anything else with cakephp for the use of Views. ... Only by informing us about this can we have a minimal idea of how to help you.
– Guilherme Nascimento
– silas santos