Can't update properties of stored objects
i’m trying to update properties of a stored object (a stdClass). But they won’t be updated inside the session.
$s = WP_Session::get_instance(); $s['obj'] = new stdClass(); $s['obj']->test = 'yep';
will correctly store the stdClass into the session. But when i later wan’t to change “test” or add a new property to “obj”, it will be lost upon the next reload.
What’s wrong here? Thank you for any help.
- The topic ‘Can't update properties of stored objects’ is closed to new replies.