You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following error is thrown when trying to run drush en devel devel_generate -y in php 5.6.40:
Argument 1 passed to drush_chalk() must be an instance of string, string given,
called in /var/www/.drush/commands/pm/backdrop_pm_enable.drush.inc
on line 62 and defined output.inc:18 [error]
E_RECOVERABLE_ERROR encountered; aborting.
To ignore recoverable errors, run again with --no-halt-on-error [error]
Drush command terminated abnormally due to an unrecoverable error.
The same command works w/o throwing any errors in php 7.0+.
The text was updated successfully, but these errors were encountered:
Prior to PHP 7 type hinting can only be used to force the types of objects and arrays. Scalar types are not type-hintable. In this case an object of the class string is expected, but you're giving it a (scalar) string. The error message may be funny, but it's not supposed to work to begin with. Given the dynamic typing system, this actually makes some sort of perverted sense.
Type Hints can only be of the object and array (since PHP 5.1) type. Traditional type hinting with int and string isn't supported.
So we basically need to decide if we'll be supporting php5 (in which case the type hinting should be removed from the drush_chalk() function), or leave things as they are and clearly state that things may not work properly if you are using php5.
The following error is thrown when trying to run
drush en devel devel_generate -y
in php 5.6.40:The same command works w/o throwing any errors in php 7.0+.
The text was updated successfully, but these errors were encountered: