Repository: wp-cli/wp-cli

Issue #2627: Installing plugin raises PHP Notice (error_reporting E_ALL)
Created: 2016-04-05T20:15:22Z
What were you doing

wp --allow-root plugin install ahn-feedsyndicate-news-content-plugin

What you expect to see

Installation of aforementioned plugin

What you actually saw

Plugin was installed however, the following notice was raised (error_reporting E_ALL):
wordpress_1 | PHP Notice:  Undefined offset: 4 in phar:///usr/local/bin/wp/php/WP_CLI/DocParser.php on line 124
wordpress_1 | PHP Stack trace:
wordpress_1 | PHP   1. {main}() /usr/local/bin/wp:0
wordpress_1 | PHP   2. include() /usr/local/bin/wp:4
wordpress_1 | PHP   3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
wordpress_1 | PHP   4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
wordpress_1 | PHP   5. WP_CLI\Runner->_run_command() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:757
wordpress_1 | PHP   6. WP_CLI\Runner->run_command() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:334
wordpress_1 | PHP   7. WP_CLI\Dispatcher\Subcommand->invoke() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:327
wordpress_1 | PHP   8. WP_CLI\Dispatcher\Subcommand->validate_args() phar:///usr/local/bin/wp/php/WP_CLI/Dispatcher/Subcommand.php:342
wordpress_1 | PHP   9. WP_CLI\DocParser->get_arg_args() phar:///usr/local/bin/wp/php/WP_CLI/Dispatcher/Subcommand.php:261
wordpress_1 | Installing FeedSyndicate Full Text News Article Importer (3.6.9.1)
wordpress_1 | Downloading install package from https://downloads.wordpress.org/plugin/ahn-feedsyndicate-news-content-plugin.zip...
wordpress_1 | Unpacking the package...
wordpress_1 | Installing the plugin...
wordpress_1 | Plugin installed successfully.


What is your system?

Linux 1e6d3716709f 4.1.19-boot2docker #1 SMP Mon Mar 7 17:44:33 UTC 2016 x86_64 GNU/Linux

Which version of PHP are you using?

PHP 7.0.4 (cli) (built: Mar 19 2016 00:29:51) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Retinas

Are you running suhosin?

No

Which version of WordPress are you using?

4.4.2

Can you share the results of which wp ?

/usr/local/bin/wp

Duplicate issue #2752: PHP Notice on $ wp plugin install
Created: 2016-05-15T15:46:51Z
Hey there,
I just installed WP Starter in my VM and was curious if WP-CLI is working with it. I ssh-ed into the VM and dir into /path/to/project/wp and is seems everything works just fine.
So I thought. If I run wp plugin install <slug> I get a PHP Notice. The command actually works and the plugin is installed. But I thought I post this here for your notice.
$ wp plugin install backwpup
PHP Notice:  Undefined offset: 4 in phar:///usr/local/bin/wp/php/WP_CLI/DocParser.php on line 124
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/wp:0
PHP   2. include() /usr/local/bin/wp:4
PHP   3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
PHP   4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
PHP   5. WP_CLI\Runner->_run_command() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:757
PHP   6. WP_CLI\Runner->run_command() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:334
PHP   7. WP_CLI\Dispatcher\Subcommand->invoke() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:327
PHP   8. WP_CLI\Dispatcher\Subcommand->validate_args() phar:///usr/local/bin/wp/php/WP_CLI/Dispatcher/Subcommand.php:342
PHP   9. WP_CLI\DocParser->get_arg_args() phar:///usr/local/bin/wp/php/WP_CLI/Dispatcher/Subcommand.php:261
# Below: Normal WP-CLI output for installing plugins in german
Installing BackWPup – WordPress Backup Plugin (3.3.1)
Runterladen des Installationspakets von https://downloads.wordpress.org/plugin/backwpup.3.3.1.zip...
Entpacken des Pakets...
Das Plugin wird installiert...
Das Plugin wurde erfolgreich installiert.

$ wp --version
WP-CLI 0.23.1

$ php --version
PHP 7.0.5-2+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
    with blackfire v1.10.4, https://blackfire.io, by Blackfireio Inc.

Closing comment (2016-05-15T17:38:24Z): Duplicate of #2627