This commit clean and fix Redis potential infinite loop by trimming value at the begining.
With previous code, the $-1 case wasn't trimmed and would end with an infinite loop. Also, it's cleaner to trim it at the begining rather than in each case.
Also, fix unserialize issue in session driver class that would trigger a php 8.1 error if the input param is null.
This commit clean and fix Redis potential infinite loop by trimming value at the begining.
With previous code, the
$-1
case wasn't trimmed and would end with an infinite loop. Also, it's cleaner to trim it at the begining rather than in each case.Also, fix
unserialize
issue in session driver class that would trigger a php 8.1 error if the input param is null.