Index: branches/5.2.x/core/kernel/nparser/ntags.php =================================================================== diff -u -N -r14092 -r14095 --- branches/5.2.x/core/kernel/nparser/ntags.php (.../ntags.php) (revision 14092) +++ branches/5.2.x/core/kernel/nparser/ntags.php (.../ntags.php) (revision 14095) @@ -1,6 +1,6 @@ Tag = $tag; } @@ -59,12 +66,14 @@ return true; } - $error_msg = 'Tag ' . $this->Parser->TagInfo($tag, true) . ' called without required ' . implode(', ', $missing_params) . ' attribute'; + $error_msg = 'Tag ' . $this->Parser->TagInfo($tag, true) . ' called without required ' . implode(', ', $missing_params) . ' attribute'; + if (count($missing_params) > 1) { $error_msg .= '(-s)'; } - $this->Application->handleError(E_USER_ERROR, $error_msg, $tag['file'], $tag['line']); + throw new ParserException($error_msg, 0, null, $tag); + return false; } @@ -165,9 +174,9 @@ // return ''; } */ - function _Tag_DefineElement($tag) + public function __construct($tag) { - parent::_BlockTag($tag); + parent::__construct($tag); $this->_requiredParams = Array ('name'); } @@ -237,9 +246,9 @@ class _Tag_Capture extends _Tag_DefineElement { - function _Tag_Capture($tag) + public function __construct($tag) { - parent::_Tag_DefineElement($tag); + parent::__construct($tag); $this->_requiredParams = Array ('to_var'); } @@ -266,9 +275,9 @@ var $_lambdaName = ''; - function _Tag_RenderElement($tag) + public function __construct($tag) { - parent::_Tag_DefineElement($tag); + parent::__construct($tag); if (!$tag['is_closing']) { $this->_requiredParams = Array ('design'); @@ -332,9 +341,9 @@ class _Tag_RenderElements extends _BlockTag { - function _Tag_RenderElements($tag) + public function __construct($tag) { - parent::_BlockTag($tag); + parent::__construct($tag); $this->_requiredParams = Array ('elements'); } @@ -375,9 +384,9 @@ class _Tag_Param extends _BlockTag { - function _Tag_Param($tag) + public function __construct($tag) { - parent::_BlockTag($tag); + parent::__construct($tag); $this->_requiredParams = Array ('name'); } @@ -453,9 +462,9 @@ */ var $_elseIfCount = 0; - function _Tag_If($tag) + public function __construct($tag) { - parent::_BlockTag($tag); + parent::__construct($tag); $this->_requiredParams = Array ('check'); } @@ -531,9 +540,10 @@ class _Tag_IfNot extends _Tag_If { - function _Tag_IfNot($tag) + public function __construct($tag) { - parent::_Tag_If($tag); + parent::__construct($tag); + $this->_Inversed = true; } @@ -631,9 +641,9 @@ class _Tag_Compress extends _BlockTag { - function _Tag_Compress($tag) + public function __construct($tag) { - parent::_BlockTag($tag); + parent::__construct($tag); if ($tag['is_closing']) { if (!array_key_exists('files', $tag['NP'])) {