diff options
Diffstat (limited to 'it_html.class')
-rw-r--r-- | it_html.class | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/it_html.class b/it_html.class index e410816..5828438 100644 --- a/it_html.class +++ b/it_html.class @@ -88,6 +88,7 @@ function __construct($p = array()) 'title' => '', # HTML title (default: no title added) 'use_it_state' => false, # If true, generate code needed by state.js (aka 'history iframe') 'srclines' => $GLOBALS['debug_srclines'], # append stackdump to each tag + 'error_on_redefine' => true, # Generate it::error when trying to redefine function for a tag ); $this->p['notexported'] = trim($p['notexported'] . ',configure,sanitize,comment', ','); @@ -111,6 +112,8 @@ function __construct($p = array()) { if (!function_exists($func) && $func) $code[$func] = "function $func() { \$args = func_get_args(); return \$GLOBALS['{$this->p['name']}']->_tag('$func', \$args); }"; + else if ($this->p['error_on_redefine']) + it::error("Trying to redefine existing function '$func' in it_html"); } # Create global functions for it_html methods |