webservice MDL-23077 fix execute ws function when the return value is null

This commit is contained in:
jerome mouneyrac 2010-07-05 06:04:47 +00:00
parent a19881868e
commit 2d5a051e14

View File

@ -714,7 +714,8 @@ class '.$classname.' {
protected function service_class_method_body($function, $params){
$descriptionmethod = $function->methodname.'_returns()';
$callforreturnvaluedesc = $function->classname.'::'.$descriptionmethod;
return ' if ('.$callforreturnvaluedesc.' == null) {
return ' if ('.$callforreturnvaluedesc.' == null) {'.
$function->classname.'::'.$function->methodname.'('.$params.');
return null;
}
return external_api::clean_returnvalue('.$callforreturnvaluedesc.', '.$function->classname.'::'.$function->methodname.'('.$params.'));';