summaryrefslogtreecommitdiff
path: root/framework/TComponent.php
diff options
context:
space:
mode:
authorxue <>2006-05-03 17:34:13 +0000
committerxue <>2006-05-03 17:34:13 +0000
commit6495c05e19db5484c3accc44cd9fcb8177202176 (patch)
tree943e52fd9eefbf56ce1d019efebad2ddc719ab90 /framework/TComponent.php
parent898d9d86fede3805340298e373d517e2a2314fc6 (diff)
added sanity check to calling event handlers
Diffstat (limited to 'framework/TComponent.php')
-rw-r--r--framework/TComponent.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/TComponent.php b/framework/TComponent.php
index 99907e4d..64854692 100644
--- a/framework/TComponent.php
+++ b/framework/TComponent.php
@@ -360,7 +360,10 @@ class TComponent
$object=$this->getSubProperty(substr($method,0,$pos));
$method=substr($method,$pos+1);
}
- $object->$method($sender,$param);
+ if(method_exists($object,$method))
+ $object->$method($sender,$param);
+ else
+ throw new TInvalidDataValueException('component_eventhandler_invalid',get_class($this),$name);
}
}
else