Closed ajira86 closed 2 years ago
But how/why/where is transformToDotSyntax()
ever called with null
?
But how/why/where is
transformToDotSyntax()
ever called withnull
?
I'll check what happens, I'm curious too ^^
So, it happens because getValidationRules
is calling getNameKey
from the Form
.
In my case, my forms are not named, this is why a null value is passed to transformToDotSyntax
In that case Form::getNameKey()
should probably check for name
nullness. IMO transformToDotSyntax
shouldn't accept null
, but we can't change that now, so adding a null-check is still smart.
But why doesn't any test break on this? We have PHP 8.1 tests... With nameless forms. Maybe deprecateds don't fail tests, hmm...
I've fixed the test suite. Deprecations are now errors. And I left another one for you ;)
(I merged that into your branch, so you'll have to pull your refactor branch.)
Sorry for the delay I didn't had the time to check it during one week. Thank you for the update and the merge ^^
Thank you for the bugfind, and the realization that deprecations were ignored in tests. You're testing the form builder well in PHP 8.1? I'm not at 8.1 yet.
Happy to hear that I can help even with little contribution.
You're testing the form builder well in PHP 8.1? I'm not at 8.1 yet.
Yes I'm working on a PHP 8.1 project because Ubuntu 22.04 provide this version by default.
Is it possible to publish a version with this fix ?
Done. You should probably just use dev-master
, because we're bad at releases, and you have to keep an eye on changes anyway.
Today str_replace is returning a blank string if a null value is specified as subject