phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.76k stars 1.96k forks source link

volt - text_area & htmlspecialchars #15992

Closed davidcorreia closed 2 years ago

davidcorreia commented 2 years ago

Discussed in https://github.com/phalcon/cphalcon/discussions/15991

Originally posted by **davidcorreia** June 11, 2022 I have been testing phalcon v5 (RC1 and just now RC2) with php8.1 and i keep getting warnings like `PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/cache/_var_www_html_app_views_index.volt.php on line 453` when i edit the "compiled" file what i see in line 453 is this: ` 'form-control', 'style' => 'height:100px']) ?>` origin code is `{{ text_area("suggest", 'class':'form-control', 'style':'height:100px') }}` after i replaced it to simple html the warnings disappeared. Also if, `Tag::setDefault('suggest', '');` is set in the controller, the warning also disappeared. its a simple workaround, but is it the expected behavior?
niden commented 2 years ago

Resolved in https://github.com/phalcon/cphalcon/pull/15993

Thank you @davidcorreia