mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
fixed wrong handling of name attribute in {insert}
thanks to Ivan Kravets for reporting this
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
||||
- fix wrong handling of insert's name attribute. (messju)
|
||||
- fix false replacement of "$t" inside double quotes (checat, messju)
|
||||
- added support for column headings and caption element to html_table and
|
||||
updated the output to use thead/tbody elements (boots)
|
||||
|
@@ -927,7 +927,11 @@ class Smarty_Compiler extends Smarty {
|
||||
$name = $this->_dequote($attrs['name']);
|
||||
|
||||
if (empty($name)) {
|
||||
$this->_syntax_error("missing insert name", E_USER_ERROR, __FILE__, __LINE__);
|
||||
return $this->_syntax_error("missing insert name", E_USER_ERROR, __FILE__, __LINE__);
|
||||
}
|
||||
|
||||
if (!preg_match('~^\w+$~', $name)) {
|
||||
return $this->_syntax_error("'insert: 'name' must be an insert function name", E_USER_ERROR, __FILE__, __LINE__);
|
||||
}
|
||||
|
||||
if (!empty($attrs['script'])) {
|
||||
|
Reference in New Issue
Block a user