cvs: smarty / NEWS /libs Smarty_Compiler.class.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1092344845@cvsserver> |
messju Thu Aug 12 17:07:25 2004 EDT
Modified files:
/smarty NEWS
/smarty/libs Smarty_Compiler.class.php
Log:
fixed occasional wrong error messages on mismatched tags when
{else}, {elseif}, {foreachelse} or {sectionelse} is involved
thanks to Ooypunk for pointing me on this
http://cvs.php.net/diff.php/smarty/NEWS?r1=1.465&r2=1.466&ty=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.465 smarty/NEWS:1.466
--- smarty/NEWS:1.465 Tue Jul 27 13:59:34 2004
+++ smarty/NEWS Thu Aug 12 17:07:24 2004
@@ -1,3 +1,5 @@
+ - fix occasional wrong error messages on mismatched tags when
+ {else}, {elseif}, {foreachelse} or {sectionelse} is involved (messju)
- fix handling of methods arguments (messju, Manfred Wischin)
- remove touch() call that made the compiled-template's timestamp the
same as the source-template's one. (messju)
http://cvs.php.net/diff.php/smarty/libs/Smarty_Compiler.class.php?r1=1.329&r2=1.330&ty=u
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.329 smarty/libs/Smarty_Compiler.class.php:1.330
--- smarty/libs/Smarty_Compiler.class.php:1.329 Tue Jul 27 13:59:35 2004
+++ smarty/libs/Smarty_Compiler.class.php Thu Aug 12 17:07:24 2004
@@ -26,7 +26,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.329 2004/07/27 17:59:35 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.330 2004/08/12 21:07:24 messju Exp $ */
/**
* Template compiling class
@@ -2205,12 +2205,17 @@
return $this->_pop_tag($close_tag);
}
if ($close_tag == 'section' && $_open_tag == 'sectionelse') {
- $this->_pop_tag($close_tag);
- return $_open_tag;
+ return $this->_pop_tag($close_tag);
}
if ($close_tag == 'foreach' && $_open_tag == 'foreachelse') {
- $this->_pop_tag($close_tag);
- return $_open_tag;
+ return $this->_pop_tag($close_tag);
+ }
+ if ($_open_tag == 'else' || $_open_tag == 'elseif') {
+ $_open_tag = 'if';
+ } elseif ($_open_tag == 'sectionelse') {
+ $_open_tag = 'section';
+ } elseif ($_open_tag == 'foreachelse') {
+ $_open_tag = 'foreach';
}
$message = " expected {/$_open_tag} (opened line $_line_no).";
}
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php