MDL-30409 moodlelib syntax errors 'throw coding_exception'

This commit is contained in:
sam marshall
2011-11-22 16:33:23 +00:00
parent 79b0fece1f
commit 3d8138bbd2
+3 -3
View File
@@ -7690,7 +7690,7 @@ function plugin_callback($type, $name, $feature, $action, $options = null, $defa
$component = clean_param($type . '_' . $name, PARAM_COMPONENT);
if (empty($component)) {
throw coding_exception('Invalid component used in plugin_callback():' . $type . '_' . $name);
throw new coding_exception('Invalid component used in plugin_callback():' . $type . '_' . $name);
}
list($type, $name) = normalize_component($component);
@@ -7701,7 +7701,7 @@ function plugin_callback($type, $name, $feature, $action, $options = null, $defa
$dir = get_component_directory($component);
if (empty($dir)) {
throw coding_exception('Invalid component used in plugin_callback():' . $type . '_' . $name);
throw new coding_exception('Invalid component used in plugin_callback():' . $type . '_' . $name);
}
// Load library and look for function
@@ -7748,7 +7748,7 @@ function plugin_supports($type, $name, $feature, $default = NULL) {
$component = clean_param($type . '_' . $name, PARAM_COMPONENT);
if (empty($component)) {
throw coding_exception('Invalid component used in plugin_supports():' . $type . '_' . $name);
throw new coding_exception('Invalid component used in plugin_supports():' . $type . '_' . $name);
}
$function = null;