Under PHP 5.3.6-6:

Deprecated function: Assigning the return value of new by reference is deprecated in                    [error]
_drush_add_commandfiles() (line 941 of /usr/local/bin/drush-folder/includes/command.inc).

This stops the execution of drush altogether.

I realise this can be ignored by turning off deprecation errors but I'm logging it as it should be fixed.

Comments

moshe weitzman’s picture

Status: Active » Postponed (maintainer needs more info)

that line does nothing unusual in 7.x-4.x or master. please retry with one of those.

rerooting’s picture

I can confirm I am having this issue as well, with the latest stable drush codebase.

drush status outputs this on another D7 site in the same local environment:

 Drupal version         :  7.2                   
 Site URI               :  http://default        
 Database driver        :  mysql                 
 Database hostname      :  localhost             
 Database username      :  <sitename>         
 Database name          :  <sitename>            
 Database               :  Connected             
 Drupal bootstrap       :  Successful            
 Drupal user            :  Anonymous             
 Default theme          :  omega_starterkit      
 Administration theme   :  rubik                 
 PHP configuration      :  /etc/php5/cli/php.ini 
 Drush version          :  4.4                   
 Drush configuration    :                        
 Drush alias files      :                        
 Drupal root            :  /var/www/<sitename>   
 Site path              :  sites/default         
 File directory path    :  sites/default/files

However in another install, that had had drush working fine until I installed CiviCRM, I am getting this output for 'drush status':

Deprecated function: Assigning the return value of new by reference  [error]
is deprecated in _drush_add_commandfiles() (line 941 of
/var/www/drush/includes/command.inc).
Deprecated function: Assigning the return value of new by reference  [error]
is deprecated in _drush_add_commandfiles() (line 941 of

I am going to try a few things to fix this. CiviCRM does not seem to be the issue, necessarily (tried uninstalling it and removing the civicrm.settings.php file and the error persists.)

Most importantly, I need to move drush from the document root to /opt or /usr/share as I should have a while ago! I may also try installing the ubuntu package.

mrl586’s picture

I have same problem.

Slovak’s picture

In my case it was a CiviCRM issue fixed by the patch.

http://issues.civicrm.org/jira/browse/CRM-8371

pimok3000’s picture

The patch solves the problem!!!

Thank you very much for the hint.

torrance123’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I am also running civicrm, so I presume problem lies there. The error message pointed me to the wrong module as the culprit.

Marking as closed.

Russell Mann’s picture

Thank you patchers!