All attempts to run backend tasks queue with PHP 7.0.6 fail with error:
WD php: Error: Call to a member function get_services() on null in Provision_Context->get_services() (line 298 of /data/disk/o2/.drush/sys/provision/Provision/Context.php). [error]
Error: Call to a member function get_services() on null in Provision_Context->get_services() (line 298 of /data/disk/o2/.drush/sys/provision/Provision/Context.php).
Drush command terminated abnormally due to an unrecoverable error. [error]
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | provision-2718437-php7-context-bug.patch | 503 bytes | steven jones |
Comments
Comment #2
steven jones commentedSeeing this error too. :(
Comment #3
steven jones commentedIt's because of this line in the class
Provision_Context:In PHP 7 it seems that effectively this code is called first:
But because the classes uses magic getters and issets:
That is always returning
FALSE.AFAIK, we should consider
isset($this->options)to always beTRUE, as you'll always get something returned from the magic getter.FUN.
Comment #4
steven jones commentedComment #5
steven jones commentedThis sorts it out for me.
Comment #6
omega8cc commentedThe patch works for me too, thanks! Please commit this :)
Comment #7
steven jones commentedIf only I had commit access...wait a second!
Comment #9
steven jones commentedComment #10
omega8cc commentedThank you :)