Hello
When I tried to invoke drush command to rebuild registry (drush rr) I've got this error:

PHP Fatal error:  Cannot use variable $client twice in /home/myuser/prj/myprj/docroot/sites/all/modules/contrib/brightcove/brightcove.video.inc on line 107
PHP Stack trace:
PHP   1. {main}() /home/myuser/.composer/vendor/drush/drush/drush.php:0
PHP   2. drush_main() /home/myuser/.composer/vendor/drush/drush/drush.php:11
PHP   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /home/myuser/.composer/vendor/drush/drush/drush.php:70
PHP   4. drush_dispatch() /home/myuser/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:64
PHP   5. drush_command() /home/myuser/.composer/vendor/drush/drush/includes/command.inc:180
PHP   6. _drush_invoke_hooks() /home/myuser/.composer/vendor/drush/drush/includes/command.inc:212
PHP   7. drush_registry_rebuild() /home/myuser/.composer/vendor/drush/drush/includes/command.inc:361
PHP   8. bootstrap_invoke_all() /home/myuser/.drush/registry_rebuild/registry_rebuild.drush.inc:173
PHP   9. drupal_load() /home/myuser/prj/myprj/docroot/includes/bootstrap.inc:1329
PHP  10. include_once() /home/myuser/prj/myprj/docroot/includes/bootstrap.inc:1359
Drush command terminated abnormally due to an unrecoverable error.                                                                                                                                          [error]
Error: Cannot use variable $client twice in /home/myuser/prj/myprj/docroot/sites/all/modules/contrib/brightcove/brightcove.video.inc, line 107

At the moment we are using 7.x-6.4 version of the module. Also I've checked 7.x-6.x-dev branch and problem still actual.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sumthief created an issue. See original summary.

sumthief’s picture

Issue summary: View changes
sumthief’s picture

Status: Active » Needs review
FileSize
712 bytes

Attach patch which removes second usage of that variable in the anon function.

sumthief’s picture

Just FYI: I've checked all other anon functions in the module and haven't found same errors.

ladybug_3777’s picture

While upgrading from 5.2 to 6.4 I came across this error. Your patch resolved it for me.

bjalford’s picture

Patche fixes issue for me too.

bjalford’s picture

Status: Needs review » Reviewed & tested by the community
kala4ek’s picture

As I see, this bug already fixed in the latest dev version.

tamasd’s picture

Status: Reviewed & tested by the community » Closed (outdated)