Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Session : array to string conversion error on multi-deimentional array #2923

Closed
alzalabany opened this Issue Mar 8, 2014 · 9 comments

Comments

Projects
None yet
5 participants

calling $CI->session->set_userdata('alertify', ['error','empty',['error,'empty data'] ]); will trigger error

A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: drivers/Session_cookie.php
Line Number: 728

$config['sess_driver'] = 'cookie'; $config['sess_valid_drivers'] = array(); $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_expire_on_close'] = TRUE; $config['sess_encrypt_cookie'] = TRUE; $config['sess_use_database'] = FALSE; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = TRUE; $config['sess_match_useragent'] = TRUE; $config['sess_time_to_update'] = 300;
not sure if this is supposed to happen or not, but thought i should mention it !.

  1. this error disappear when using native driver.
  2. this error was not existing in v 2.*

Whats the content of $sess?

This was referenced Mar 8, 2014

@alzalabany alzalabany closed this Mar 12, 2014

@narfbg narfbg reopened this Mar 12, 2014

Contributor

narfbg commented Mar 12, 2014

2 other people have reported the same bug and I've closed them as duplicates of this issue. It is an unresolved bug still, so it should remain open for the time being.

Otherwise, I've known about this problem since before it was reported, but I'm working on a replacement for the current sessions, which would solve it.

Contributor

aanbar commented Mar 13, 2014

Looks like the code that's causing this problem isn't actually doing anything useful since it's modifying ->userdata array & what's actually added into the cookie is $cookie_data (There's no reference).

Contributor

aanbar commented Mar 29, 2014

@narfbg If you're not working on this, I am willing to get this specific issue fixed.

Contributor

narfbg commented Mar 29, 2014

Read my last comment on it.

Contributor

aanbar commented Mar 30, 2014

Got it :-)

narfbg added a commit that referenced this issue Apr 14, 2014

Change 'standardize_newlines' default to FALSE
I don't see why it should be enabled by default. Also, this is the functionality triggering #2923
Contributor

jim-parry commented Nov 12, 2014

This is supeceded by #3073? Should it then be closed?

Contributor

narfbg commented Nov 12, 2014

It will be closed when #3073 is closed.

Contributor

narfbg commented Jan 19, 2015

Fixed by #3073.

@narfbg narfbg closed this Jan 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment