Patch attached.

CommentFileSizeAuthor
str-usage.patch659 bytesgielfeldt

Comments

gielfeldt created an issue. See original summary.

znerol’s picture

Status: Active » Reviewed & tested by the community

I was about to submit the exact same patch.

Also note that this will fix the weird behavior that new sessions are created on every request for some sites. In fact, this is only the case if the $_SESSION superglobal contains data at the end of a request. The faulty code generates PHP warnings, and those will be stored as messages in the session (unless suppressed by the site admin).

The take home notice here is: If you see sessions started on api requests, then your code is likely buggy. Check your logs.

nlisgo’s picture

Status: Reviewed & tested by the community » Needs work

This patch no longer applies to 7.x-1.3

znerol’s picture

Status: Needs work » Reviewed & tested by the community

This patch is against 7.x-1.x (i.e. the dev branch) and it certainly applies there. Regrettably that version is not selectable from the version dropdown in this issue tracker.

nlisgo’s picture

Apologies. I didn't see a dev branch posted. That make sense then.

markpavlitski’s picture

Thanks for the patch! This has been committed :)

markpavlitski’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

markpavlitski’s picture