Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | brightcove-anonymous_function_twice_variable-2843739-3.patch | 712 bytes | sumthief |
Comments
Comment #2
sumthief CreditAttribution: sumthief as a volunteer and at DrupalJedi commentedComment #3
sumthief CreditAttribution: sumthief as a volunteer and at DrupalJedi commentedAttach patch which removes second usage of that variable in the anon function.
Comment #4
sumthief CreditAttribution: sumthief as a volunteer and at DrupalJedi commentedJust FYI: I've checked all other anon functions in the module and haven't found same errors.
Comment #5
ladybug_3777 CreditAttribution: ladybug_3777 commentedWhile upgrading from 5.2 to 6.4 I came across this error. Your patch resolved it for me.
Comment #6
bjalford CreditAttribution: bjalford at Bright Sites Consulting commentedPatche fixes issue for me too.
Comment #7
bjalford CreditAttribution: bjalford at Bright Sites Consulting commentedComment #8
kala4ekAs I see, this bug already fixed in the latest dev version.
Comment #9
tamasd CreditAttribution: tamasd at Pronovix commented