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
But Nette\Forms\Helpers::sanitize method throws exception Nette\InvalidArgumentException('Unknown data type'), because for DATA_KEYS not exist sanitizer.
Field named like extraFields[image] and contains array(e.g. extraFields[image][name]). If named array parameter contains array value, library not sanitize this, it's seen in Nette\Forms\Helpers::extractHttpData method.
if (substr($htmlName, -2) === '[]') {
// if key named, code here not executed...
} else {
// this is not sanitize DATA_KEYSreturnstatic::sanitize($itype, $data);
}
This is normally or you forgot add sanitizer and it's bug? (Nette/Forms 2.3)
The text was updated successfully, but these errors were encountered:
Hi! Thanks for good library.
In class
Nette\Forms\Form
declared 4 data type constants: DATA_TEXT, DATA_LINE, DATA_FILE, DATA_KEYS.I create custom control and in overrided
loaddHttpData
method I set data type to DATA_KEYS.But
Nette\Forms\Helpers::sanitize
method throws exceptionNette\InvalidArgumentException('Unknown data type')
, because for DATA_KEYS not exist sanitizer.Field named like
extraFields[image]
and contains array(e.g.extraFields[image][name]
). If named array parameter contains array value, library not sanitize this, it's seen inNette\Forms\Helpers::extractHttpData
method.This is normally or you forgot add sanitizer and it's bug? (Nette/Forms 2.3)
The text was updated successfully, but these errors were encountered: