You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by Alistar84 September 27, 2022
Good morning,
I'm trying to migrate my project from v4 to v5.
I noticed some strange behavior in Form class.
When I create a simple element like this: $username = new Text('username', array('required'=>true, 'class'=>'form-control', 'maxlength'=>50));
I've got an error: Input must be an array or a string.
This happens because the method Phalcon\Html\Escaper->attributes() now accepts only string or array.
If I change the code by putting numbers and booleans between quotes, all works fine: $username = new Text('username', array('required'=>'true', 'class'=>'form-control', 'maxlength'=>'50'));
I need to edit all my forms elements, or is this a bug?
The text was updated successfully, but these errors were encountered:
* master:
Fix typo from Loader registerNamespaces
add backer
updating ext and refreshing optimized files
new version prep
[#16123] - updated changelog
[#16123] - corrected attributes escaping - removed array/string check
[#16123] - changed string checking for level
more adjustments
disabling macos for the release; will add when we fix those builds
[#16123] - updated changelog
[#16123] - corrected attributes escaping - removed array/string check
[#16123] - changed string checking for level
more adjustments
disabling macos for the release; will add when we fix those builds
Discussed in #16122
Originally posted by Alistar84 September 27, 2022
Good morning,
I'm trying to migrate my project from v4 to v5.
I noticed some strange behavior in Form class.
When I create a simple element like this:
$username = new Text('username', array('required'=>true, 'class'=>'form-control', 'maxlength'=>50));
I've got an error: Input must be an array or a string.
This happens because the method
Phalcon\Html\Escaper->attributes()
now accepts only string or array.If I change the code by putting numbers and booleans between quotes, all works fine:
$username = new Text('username', array('required'=>'true', 'class'=>'form-control', 'maxlength'=>'50'));
I need to edit all my forms elements, or is this a bug?
The text was updated successfully, but these errors were encountered: