Re: [PHP-DEV] PR for minor bugfix in compact()

2021-05-07 Thread David Gebler
Great, that's been updated, build in progress (relevant tests passing locally). I'd have preferred TypeError but appreciate there being a consistent convention to follow. These kind of small fixes are also about me becoming more familiar with typical conventions in the engine - some of this stuff i

Re: [PHP-DEV] PR for minor bugfix in compact()

2021-05-07 Thread Ben Ramsey
Christian Schneider wrote on 5/7/21 02:06: > I agree with George that it should be an E_WARNING first and then changed to > a TypeError in PHP 9. > This should be the default process for reasons given in many other threads > about tightening type rules IMHO. > > So no, I'd prefer if this PR to b

Re: [PHP-DEV] PR for minor bugfix in compact()

2021-05-07 Thread Christian Schneider
Am 07.05.2021 um 03:44 schrieb Ben Ramsey : > On 4/28/21 06:17, G. P. B. wrote: >> On Wed, 28 Apr 2021 at 12:12, David Gebler wrote: >>> Hi internals, >>> I've opened a PR to cause compact() to throw a TypeError if its parameters >>> are not valid, which I consider to be a fix for what is effectiv

Re: [PHP-DEV] PR for minor bugfix in compact()

2021-05-06 Thread Ben Ramsey
On 4/28/21 06:17, G. P. B. wrote: On Wed, 28 Apr 2021 at 12:12, David Gebler wrote: Hi internals, I've opened a PR to cause compact() to throw a TypeError if its parameters are not valid, which I consider to be a fix for what is effectively a bug whereby logical errors in user code can be sile

Re: [PHP-DEV] PR for minor bugfix in compact()

2021-04-28 Thread David Gebler
Ah I see, thanks for the clarification! I only did it this way because when I did my RFC for fsync, I recall one or two people mentioned they weren't keen on the bit where it could raise a warning rather than a TypeError - but I appreciate that one was a completely new function and not a change to

Re: [PHP-DEV] PR for minor bugfix in compact()

2021-04-28 Thread G. P. B.
On Wed, 28 Apr 2021 at 12:12, David Gebler wrote: > Hi internals, > I've opened a PR to cause compact() to throw a TypeError if its parameters > are not valid, which I consider to be a fix for what is effectively a bug > whereby logical errors in user code can be silently swallowed. > > GPB has d

[PHP-DEV] PR for minor bugfix in compact()

2021-04-28 Thread David Gebler
Hi internals, I've opened a PR to cause compact() to throw a TypeError if its parameters are not valid, which I consider to be a fix for what is effectively a bug whereby logical errors in user code can be silently swallowed. GPB has done an initial review and left a comment https://github.com/php