Skip to content

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

@porg

Description

@porg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions