mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Include new "full_path" field in security hash as of PHP 8.1
This commit is contained in:
parent
ef8fee29b2
commit
a139699e7e
1 changed files with 3 additions and 0 deletions
|
@ -1803,6 +1803,9 @@ class FormHelper extends AppHelper {
|
|||
foreach (array('name', 'type', 'tmp_name', 'error', 'size') as $suffix) {
|
||||
$this->_secure($secure, array_merge($field, array($suffix)));
|
||||
}
|
||||
if (version_compare(PHP_VERSION, '8.1.0', '>=')) {
|
||||
$this->_secure($secure, array_merge($field, array('full_path')));
|
||||
}
|
||||
|
||||
$exclude = array('name' => null, 'value' => null);
|
||||
return $this->Html->useTag('file', $options['name'], array_diff_key($options, $exclude));
|
||||
|
|
Loading…
Reference in a new issue