mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #67363
[Bug 1991591] Re: Group cloning fails
** Description changed:
If the user tries to clone a group named with special characters (mb4),
the cloning will fail.
The bug is in version 21.10.04 and maybe elsewhere.
It is caused by an error in the lib/group.php script on line 377.
Here, strtolower is mistakenly used instead of mb_strtolower.
The code on the line should be:
if (get_records_sql_array('SELECT id FROM {group} WHERE LOWER(TRIM(name)) = ?', array(mb_strtolower(trim($data['name']))))) {
+ Same problem is in group/edit.php:
+
+ on line 481. Correct code is here:
+ if ($ids = get_records_sql_array('SELECT id FROM {group} WHERE LOWER(TRIM(name)) = ?', array(mb_strtolower(trim($values['name']))))) {
+
+ line 497
+ if ($ids = get_records_sql_array('SELECT id FROM {group} WHERE LOWER(TRIM(shortname)) = ?', array(mb_strtolower(trim($values['shortname']))))) {
+
+
Regards. Tomas Jakes
** Summary changed:
- Group cloning fails
+ Group cloning fails - problem with multibyte UTF8
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1991591
Title:
Group cloning fails - problem with multibyte UTF8
Status in Mahara:
New
Bug description:
If the user tries to clone a group named with special characters
(mb4), the cloning will fail.
The bug is in version 21.10.04 and maybe elsewhere.
It is caused by an error in the lib/group.php script on line 377.
Here, strtolower is mistakenly used instead of mb_strtolower.
The code on the line should be:
if (get_records_sql_array('SELECT id FROM {group} WHERE LOWER(TRIM(name)) = ?', array(mb_strtolower(trim($data['name']))))) {
Same problem is in group/edit.php:
on line 481. Correct code is here:
if ($ids = get_records_sql_array('SELECT id FROM {group} WHERE LOWER(TRIM(name)) = ?', array(mb_strtolower(trim($values['name']))))) {
line 497
if ($ids = get_records_sql_array('SELECT id FROM {group} WHERE LOWER(TRIM(shortname)) = ?', array(mb_strtolower(trim($values['shortname']))))) {
Regards. Tomas Jakes
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1991591/+subscriptions
References