http icon indicating copy to clipboard operation
http copied to clipboard

UserStorage: allow sessionSection to be null

Open kostirez1 opened this issue 10 months ago • 0 comments

  • bug fix
  • BC break? no
  • doc PR: not required

Broken since 3.3.0 (added property typehints) due to the code relying on $sessionSection property being nullable and preinitialized to null during creation. Currently failing on Error: Typed property Nette\Http\UserStorage::$sessionSection must not be accessed before initialization when calling getSessionSection()

This commit reverts $sessionSection to the same behavior it had before adding the native typehint.

Branch v3.3 is the only affected one, master and v4.0 no longer contain this deprecated class (removed deprecated stuff).

kostirez1 avatar Feb 23 '25 16:02 kostirez1