Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70941

Cannot rename content bank item to "0"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.9.4, 3.10.1, 3.11, 4.0
    • 3.9.5, 3.10.2
    • Content bank

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              davidmatamoros David Matamoros
              pholden Paul Holden
              Amaia Anabitarte Amaia Anabitarte
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Anna Carissa Sadia Anna Carissa Sadia
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Mar/21

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 35 minutes
                  1h 35m