On 26/02/2022 22:34, Robert Landers wrote:
This is not semantically the same though. A $_POST of a form, for example,
will usually contain an empty value if the form input was empty, but
missing if the form control wasn't in the form (maybe the form control is
injected via Javascript, or
I just wanted to add that the following
$name = $_POST['name'] ?: 'Default Name';
with existence check would be
$name = $_POST['name'] ?? null ?: 'Default Name';
You don't need empty().
I would be against changing the behaviour of elvis/ternary operator.
However, I remember seeing past
On Sat, Feb 26, 2022 at 11:34 PM Robert Landers
wrote:
> On Sat, Feb 26, 2022 at 5:35 PM Mark Randall wrote:
>
>> On 26/02/2022 09:09, Robert Landers wrote:
>> > I'd like to propose and implement an RFC that would consider dropping
>> the
>> > warning if and only if array access is the only
On Sat, Feb 26, 2022 at 5:35 PM Mark Randall wrote:
> On 26/02/2022 09:09, Robert Landers wrote:
> > I'd like to propose and implement an RFC that would consider dropping the
> > warning if and only if array access is the only test in ternary and short
> > ternary (?:) operations but first I'd
On 26/02/2022 09:09, Robert Landers wrote:
I'd like to propose and implement an RFC that would consider dropping the
warning if and only if array access is the only test in ternary and short
ternary (?:) operations but first I'd like to start a discussion to see if
it is worth pursuing. I'd like
>
> 1. Disallow both serialization and unserialization.
>
> This will make the serialization issue very obvious, but will require
> adjustments to exception handlers that serialize the stack traces.
Hi,
Note that exception handlers that serialise stack traces without taking into
account
On Thu, 24 Feb 2022 at 14:11, Tim Düsterhus, WoltLab GmbH
wrote:
>
> I see two possible options to remediate this issue:
>
> ---
>
> 1. Disallow both serialization and unserialization.
>
> This will make the serialization issue very obvious, but will require
> adjustments to exception
Hello internals!
There is a lot of code in existence that does something like this:
$item['id'] ? [$item['id']] : $something_else
which to dissolve the current warning must be changed to something like
this:
!empty($item['id']) ? [$item['id']] : $something_else
However, if performance is an