1
votes

Struggling to find any similar reports, so thought I;d ask if anyone else has encountered this, or knows why it might be happening.

I'm setting some session flashdata, and using the keep_flashdata property to ensure it's not lost over a couple of requests. It's used exclusively in a linear process that ends in a confirmation screen that displays the flashdata.

The issue is that sometimes, although relatively randomly, what will display is old flashdata.

I.e. if the user runs through the process once, they'll get the correct data, but a second time they might get the data from last time. We even encountered a situation whereby the second time the flashdata was blank, but the third time it was the flashdata from the first run through (which was completely mad)

The values that are going into the flashdata definitely exist, as the whole thing would break if they didn't. So this isn't a case of trying to set new flashdata with undefined and ending up retaining the old data - which is the only scenario that makes sense to me.

Anyone seen anything like this? Could it be because of how sessions work? Maybe it;s related to the keep_flashdata property? Is there a way to 'unset' flashdata?

1

1 Answers

1
votes

You need to destroy the session if it exists at the beginning of your process:

sess_destroy();