Skip to content

Bug: False positive result shown when theme slug is entered in non-lowercase for activation #121

@arunsathiya

Description

@arunsathiya

Steps to reproduce: Follow the steps below to reproduce the issue.

  • Enter theme slug in non-lowercase when activating it (Examples: wp theme activate Dara, `wp theme
  • Notice a success message shown Success: Switched to 'Dara' theme.
  • Enter wp theme list to notice that no themes are active
➜  local wp theme list
+-----------------+----------+--------+---------+
| name            | status   | update | version |
+-----------------+----------+--------+---------+
| dara            | inactive | none   | 1.2.1   |
| twentyseventeen | inactive | none   | 1.7     |
+-----------------+----------+--------+---------+
➜  local

What is expected: Theme activation does not go through, and the success notice is not shown.

What happens instead: A success message is shown, but no theme is not activated.

Screencast indicating this behaviour: https://asciinema.org/a/JICHDMDwcPjsVibxZMUlHOHRJ

In theory, slug is supposed to be entered in lowercase.

--

  • Tested on a local install of WordPress. WordPress 4.9.8
  • PHP version: 7.2.8
  • WP-CLI version: 2.0.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions