cvs: pear /HTML_Template_Flexy/Flexy Element.php Test.php Token.php
| From: | Alan Knowles | Date: | Sat, 14 Jun 2003 02:41:33 +0000 |
| Subject: | cvs: pear /HTML_Template_Flexy/Flexy Element.php Test.php Token.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-10953@lists.php.net to get a copy of this message | ||
alan_k Fri Jun 13 22:41:33 2003 EDT
Modified files:
/pear/HTML_Template_Flexy/Flexy Element.php Test.php Token.php
Log:
tidy up error message
Index: pear/HTML_Template_Flexy/Flexy/Element.php
diff -u pear/HTML_Template_Flexy/Flexy/Element.php:1.1
pear/HTML_Template_Flexy/Flexy/Element.php:1.2
--- pear/HTML_Template_Flexy/Flexy/Element.php:1.1 Wed Jun 11 07:03:54 2003
+++ pear/HTML_Template_Flexy/Flexy/Element.php Fri Jun 13 22:41:33 2003
@@ -17,7 +17,7 @@
// | Based on HTML_Common by: Adam Daniel <adaniel1@eesus.jnj.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Element.php,v 1.1 2003/06/11 11:03:54 alan_k Exp $
+// $Id: Element.php,v 1.2 2003/06/14 02:41:33 alan_k Exp $
/**
* Lightweight HTML Element builder and render
@@ -374,7 +374,7 @@
continue;
}
$atts=array();
- if ($k != $v) {
+ if ($k !== $v) {
$atts = array('value'=>$k);
}
$add = new HTML_Template_Flexy_Element('option',$atts);
Index: pear/HTML_Template_Flexy/Flexy/Test.php
diff -u pear/HTML_Template_Flexy/Flexy/Test.php:1.8 pear/HTML_Template_Flexy/Flexy/Test.php:1.9
--- pear/HTML_Template_Flexy/Flexy/Test.php:1.8 Wed Jun 11 07:03:54 2003
+++ pear/HTML_Template_Flexy/Flexy/Test.php Fri Jun 13 22:41:33 2003
@@ -17,7 +17,7 @@
// | Authors: nobody <nobody@localhost> |
// +----------------------------------------------------------------------+
//
-// $Id: Test.php,v 1.8 2003/06/11 11:03:54 alan_k Exp $
+// $Id: Test.php,v 1.9 2003/06/14 02:41:33 alan_k Exp $
//
// This is a temporary file - it includes some of the
// Code that will have to go in the Engine eventually..
@@ -88,7 +88,7 @@
$res = HTML_Template_Flexy_Token::buildTokens($tokenizer);
- new Gtk_VarDump($res);
+ //new Gtk_VarDump($res);
echo $res->toString();
print_r(array_unique($GLOBALS['_HTML_TEMPLATE_FLEXY_TOKEN']['gettextStrings']));
print_r($this->_elements);
@@ -115,4 +115,4 @@
new HTML_Template_Flexy_Test;
-?>
\ No newline at end of file
+?>
Index: pear/HTML_Template_Flexy/Flexy/Token.php
diff -u pear/HTML_Template_Flexy/Flexy/Token.php:1.18 pear/HTML_Template_Flexy/Flexy/Token.php:1.19
--- pear/HTML_Template_Flexy/Flexy/Token.php:1.18 Mon Apr 28 23:32:20 2003
+++ pear/HTML_Template_Flexy/Flexy/Token.php Fri Jun 13 22:41:33 2003
@@ -16,7 +16,7 @@
// | Authors: Alan Knowles <alan@akbkhome> |
// +----------------------------------------------------------------------+
//
-// $Id: Token.php,v 1.18 2003/04/29 03:32:20 alan_k Exp $
+// $Id: Token.php,v 1.19 2003/06/14 02:41:33 alan_k Exp $
//
// This is the master Token file for The New Token driver Engine.
// All the Token output, and building routines are in here.
@@ -125,8 +125,13 @@
function toString() {
if (is_array($this->value)) {
- var_dump($this);
- exit;
+ echo "<PRE>";
+ print_r($this);
+ echo "</PRE>";
+ PEAR::raiseError('HTML_Template_Flexy::Syntax error in Template line:'.
$tokenizer->yyline.
+ "You used a tag incorrectly: eg <foreach=\"xxx\"..."
+ , null,PEAR_ERROR_DIE);
+
}
$ret = $this->value;
$ret .= $this->childrentoString();
@@ -507,4 +512,4 @@
}
-?>
\ No newline at end of file
+?>