Re: [PHP-DEV] JSON_THROW_ON_ERROR implementation detail

2019-05-12 Thread Dan Ackroyd
On Fri, 10 May 2019 at 15:42, Bishop Bettini wrote: > > Extant 7.3 code might be: People would only write code like that if they hadn't read the manual (or code documentation in their IDE) for json_last_error() which clearly states 'Returns the last error (if any) occurred during the last JSON en

Re: [PHP-DEV] JSON_THROW_ON_ERROR implementation detail

2019-05-10 Thread Bishop Bettini
On Fri, May 10, 2019 at 2:52 PM Riikka Kalliomäki < riikka.kalliom...@riimu.net> wrote: > > The new code has what looks like, to me, a refactor bug. I'd expect that, > when one adds the JSON_THROW_ON_ERROR flag, one must also remove the > subsequent json_last_error() handling, as it's no longer re

Re: [PHP-DEV] JSON_THROW_ON_ERROR implementation detail

2019-05-10 Thread Riikka Kalliomäki
> The new code has what looks like, to me, a refactor bug. I'd expect that, when one adds the JSON_THROW_ON_ERROR flag, one must also remove the subsequent json_last_error() handling, as it's no longer relevant to that call and instead relevant to the most recent prior call. This does create a kin

Re: [PHP-DEV] JSON_THROW_ON_ERROR implementation detail

2019-05-10 Thread Bishop Bettini
On Thu, May 9, 2019 at 12:06 PM Dan Ackroyd wrote: > Apparently there is an implementation detail in JSON_THROW_ON_ERROR > that differs in the RFC text, from the discussion on list > http://news.php.net/php.internals/100569: > > > I decided to reset it to no error because there's no > > previous

[PHP-DEV] JSON_THROW_ON_ERROR implementation detail

2019-05-09 Thread Dan Ackroyd
Hi, Apparently there is an implementation detail in JSON_THROW_ON_ERROR that differs in the RFC text, from the discussion on list http://news.php.net/php.internals/100569: > I decided to reset it to no error because there's no > previous error that needs handling by error-checking code, the excep