Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On my installation of mySQL (5.5.18) the simple sql creating role is not working.
In the code it is:
db_query("INSERT INTO {role} VALUES('', '%s')", $role_name);
However Drupal (actually mySQL) complains about the first argument being ''. I would change it to:
db_query("INSERT INTO {role}(name) VALUES('%s')", $role_name);
which seems more "standard" and corrects the error.
Comments
Comment #1
pkaczynski CreditAttribution: pkaczynski commentedSorry, this is a duplicate of #1238116: INSERT INTO statement in permissions_create_role() not working. When's it going to be in release? The last one was over a year ago!