fuel / core

Fuel PHP Framework - The core of the Fuel v1 framework
http://fuelphp.com
811 stars 344 forks source link

Fix redis infinite loop issue #2172

Closed Rin3917 closed 2 years ago

Rin3917 commented 2 years ago

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.

WanWizard commented 2 years ago

Thanks. I've manually split the PR into two commits, as these two fixes are unrelated.