This particular warning comes from Pear Console Table package. I referenced related issue in the ticket description. That package does not seem actively maintained. Given it is just a single class, we could simply copy it to Drush 8 codebase.
function _updateRowsCols($rowdata = null) {
// ...
$this->_max_cols = max($this->_max_cols, count($rowdata));
// ...
Console_Table class is doing it wrong because it relies on the count() to function as an !empty() as well.
My 👍 to copy, fix, and keep the class ourselves. It's not like we can make significant changes (for example use a better library) at this 8.x age.
Alternately we could @silent() the parent caller. Feels dirty either way.
On Mar 9, 2018 23:16, "Greg Anderson" ***@***.***> wrote:
Is this fixed in pear/console_table 1.3.1 / Drush 8.1.16? Not sure what
the resolution was, but that seemed to be my conclusion during light
testing yesterday. Didn't see the message when running 8.1.16.
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
#3226 (comment)>,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AAxiIWpXHb6xV18968fKfR92tkz9k92Hks5tcpzZgaJpZM4Q8AGs>
Using pear install Console_Table I was also updated to 1.3.1 but I unfortunately am still flooded with count() warnings. When installing drush 8 dev, I get version 8.0.2; where when installing drush 8 I get version 8.0.0. I think something is confused. Regardless, upgrading to drush 9 resolved all of the issues.
I think the PHP requirements in the documentation are not correct. Old Drush version are likely not compatible with PHP 7.2+.
https://docs.drush.org/en/master/install/#drupal-compatibility
Use Console_Table 1.3.1 instead of Console_Table 1.1.5 that comes by default with drush 6.7.0 version.
At https://github.com/drush-ops/drush/blob/6.x/includes/environment.inc Console_Table 1.1.5 is downloaded dynamically if it does not already exist in lib folder. So we download 1.3.1 first and rename it to 1.1.5 as a "trick" to make it work without any other change
Error sighted. If drush is globally installed this can be fixed via:
composer global require pear/console_table
That solved it! Thanks
For Drush 7 users. I've added this requirement in my project composer.json, cc @darkdiesel:
"pear/console_table": "v1.3.1 as v1.2.99"
For Drush 7 users. I've added this requirement in my project composer.json, cc @darkdiesel:
"pear/console_table": "v1.3.1 as v1.2.99"
For Drush 7, installed globally I added this in the ~/.composer/composer.json file, and then I runned 'composer update'