-
Bug
-
Resolution: Fixed
-
Minor
-
3.9.4, 3.10.1, 3.11, 4.0
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MOODLE_310_STABLE, MOODLE_39_STABLE
-
MDL-70941-master -
Create a content bank item with a name such as "Cool bananas", view it and from the "Actions menu" press "Rename"
Try to rename to: "0" (just the number zero without any quotes)
You receive the error message "Empty name is not allowed" and the item is not renamed
It fails because this empty check doesn't work for strings (PHP considers the string "0" to be empty) - similar change in core_contenbank\content\set_name() probably required too
davidmatamoros and I found while he was looking at MDL-70910