Re: What type of Exceptio n to use for unserialize() failure?

From: Date: Fri, 26 Aug 2022 22:17:40 +0000
Subject: Re: What type of Exceptio n to use for unserialize() failure?
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-118522@lists.php.net to get a copy of this message
On 25 August 2022 16:06:48 BST, "Tim Düsterhus" wrote: >- I've noticed that 'unserialize()' already emits E_WARNING for some types of >error (e.g. out-of-bounds integers), so users already need to be prepared for E_WARNING to be >emitted. I've adjusted the aforementioned Notice to Warning, but we might be able to directly >jump to UnserializationFailedException from the existing warnings? IMHO, any change from Warning or lower to Exception or Error is a clear Breaking Change, because it can make a program that runs successfully under one version abort mid-process in another. So, while it probably makes sense for all serialisation errors to consistently throw, that should be planned for 9.0, and everything that's not already an exception could raise a consistently formatted E_WARNING in 8.3. Regards, -- Rowan Tommins [IMSoP]

« previous php.internals (#118522) next »