summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas BrĂ¼derli2007-01-03 11:54:51 +0000
committerThomas BrĂ¼derli2007-01-03 11:54:51 +0000
commit5b29e1817f32454d79c3efa9d2a7688d00a85fbd (patch)
treee7ddd9446c7a6dc1f8254e995057393d5c78a34e
parentef4267241d9ef3b397d9251a4f023a5d762f5571 (diff)
downloaditools-5b29e1817f32454d79c3efa9d2a7688d00a85fbd.tar.gz
itools-5b29e1817f32454d79c3efa9d2a7688d00a85fbd.tar.bz2
itools-5b29e1817f32454d79c3efa9d2a7688d00a85fbd.zip
Check if global function already exists before creating it
-rw-r--r--html.class5
1 files changed, 4 insertions, 1 deletions
diff --git a/html.class b/html.class
index 9109efd..cca2de7 100644
--- a/html.class
+++ b/html.class
@@ -81,7 +81,10 @@ function it_html($config = array())
# Create global functions for methods that are statically callable (have same arguments as global stubs)
foreach (explode(",", $this->_staticallycallable) as $func)
- $code[$func] = "function $func() { \$args = func_get_args(); return call_user_func_array(array(&\$GLOBALS['$this->_name'], '$func'), \$args); }";
+ {
+ if ($func && !function_exists($func))
+ $code[$func] = "function $func() { \$args = func_get_args(); return call_user_func_array(array(&\$GLOBALS['$this->_name'], '$func'), \$args); }";
+ }
eval(join("", (array)$code));