Re: Bug #68063: session-related, how to fix it?
| From: | Tjerk Meesters | Date: | Sun, 21 Sep 2014 00:12:57 +0000 |
| Subject: | Re: Bug #68063: session-related, how to fix it? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-77396@lists.php.net to get a copy of this message | ||
> On 20 Sep, 2014, at 11:35 pm, Florian Margaine <florian@margaine.com> wrote:
>
> Hi list,
>
> I saw this interesting bug:
> https://bugs.php.net/bug.php?id=68063
>
> Basically, if
session_id('') is run before
> session_start(), weird
> things happen.
>
> The bug reporter proposes 2 ways to fix this:
>
> - session_start() should silently fix the situation
I would opt for this, if an invalid session id is given a warning should be emitted and a new id
generated.
> - or session_start() should noisely fail
>
> Both solutions look fine to me, but I'm not sure what PHP should do. Should
> it be resilient and silently fix the situation?
>
> Regards,
>
> *Florian Margaine*