wp-cli / extension-command

Manages plugins and themes, including installs, activations, and updates.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wp plugin list: Gives table output but also throws PHP Warning regarding plugin "svg-support"

porg opened this issue · comments

commented

Foreword: I do not know whether this is a bug of wp plugin list or of whether plugin svg-support declared something wrong on which wp plugin list then chokes.

I got an output (table shown redacted below) but also a PHP Warning

$ cd ~/html/apps/myDomain
$ wp plugin list
PHP Warning:  Trying to access array offset on value of type null in /data/web/customer-nr/html/apps/myDomain/wp-content/plugins/svg-support/functions/mime-types.php on line 22
Warning: Trying to access array offset on value of type null in /data/web/customer-nr/html/apps/myDomain/wp-content/plugins/svg-support/functions/mime-types.php on line 22
+-------------------------------------------------------------+----------+-----------+----------+
| name                                                        | status   | update    | version  |
+-------------------------------------------------------------+----------+-----------+----------+
| aaa example                                                 | inactive | none      | x.y.z    |
| bbb example                                                 | active   | available | x.y      |
| ccc example                                                 | active   | none      | x.y.z    |
| ...                                                         | ...      | ...       | ...      |
| svg-support                                                 | active   | none      | 2.5.4    |
| ...                                                         | ...      | ...       | ...      |
| zzz example                                                 | active   | none      | x.y.z    |
+-------------------------------------------------------------+----------+-----------+----------+

Environment

OS:	Linux 4.19.0-22-amd64 #1 SMP Debian 4.19.260-1 (2022-09-29) x86_64
Shell:	/bin/bash
PHP binary:	/usr/bin/php8.0
PHP version:	8.0.22
php.ini used:	/etc/php/8.0/cli/php.ini
MySQL binary:	/usr/bin/mysql
MySQL version:	mysql  Ver 14.14 Distrib 5.7.39-42, for debian-linux-gnu (x86_64) using  7.0
SQL modes:	
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	/data/web/customer-nr/html/apps/myDomain (Note: customer-nr and myDomain were redacted)
WP-CLI packages dir:	
WP-CLI cache dir:	/data/web/customer-nr/.wp-cli/cache
WP-CLI global config:	
WP-CLI project config:	
WP-CLI version:	2.7.1
commented

Closing this

  • I now had performed a wp list themes (for the first time as a newbie) and it threw the same error.
    • I then thought: Either this is a bug that both "list" commands of wp-cli have in common.
  • Or (and I thought this is more plausible), plugin svg-support has some malformed code.

Sorry for the wrong alarm

  • I had performed a DuckDuckGo and a Google search for the error message (with different omissions) but had found nothing.
  • Eventually in this specific support forum, searching for "mime-types.php" yielded a result.
  • About two weeks old. Maybe the web spiders did not yet pick it up.