Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
alzalabany opened this Issue · 9 comments

5 participants

@alzalabany

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.*
@asakapab0i

Whats the content of $sess?

This was referenced
@alzalabany alzalabany closed this
@narfbg narfbg reopened this
@narfbg
Owner

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.

@aanbar

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).

@aanbar

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

@narfbg
Owner

Read my last comment on it.

@aanbar

Got it :-)

@narfbg narfbg referenced this issue from a commit
@narfbg narfbg Change 'standardize_newlines' default to FALSE
I don't see why it should be enabled by default. Also, this is the functionality triggering #2923
aeed15e
@nashcontrol nashcontrol referenced this issue from a commit
@narfbg narfbg Change 'standardize_newlines' default to FALSE
I don't see why it should be enabled by default. Also, this is the functionality triggering #2923
8beaaf7
@jim-parry
Owner

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

@narfbg
Owner

It will be closed when #3073 is closed.

@narfbg
Owner

Fixed by #3073.

@narfbg narfbg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.