]> git.mjollnir.org Git - moodle.git/commitdiff
groups: NOBUG fix syntax error seen on http://moodle.org/mod/cvsadmin/view.php?tab...
authortjhunt <tjhunt>
Sat, 3 Oct 2009 07:57:50 +0000 (07:57 +0000)
committertjhunt <tjhunt>
Sat, 3 Oct 2009 07:57:50 +0000 (07:57 +0000)
PHP Fatal error:  Can't use function return value in empty call.

group/externallib.php

index 118d3df5c8da084ff3dfd6a3b5aff62dbe31da67..1a79038021ae1ce85b6e9926f029d10121ac8522 100644 (file)
@@ -52,7 +52,7 @@ class moodle_group_external extends external_api {
         foreach ($params['groups'] as $group) {
             $group = (object)$group;
 
-            if (empty(trim($group->name))) {
+            if (trim($group->name) == '') {
                 throw new invalid_parameter_exception('Invalid group name');
             }
             if ($DB->get_record('groups', array('courseid'=>$group->courseid, 'name'=>$group->name))) {