rollbar / rollbar-php

Error tracking and logging from PHP to Rollbar
https://docs.rollbar.com/docs/php
MIT License
334 stars 121 forks source link

Too few arguments to function drush_error_handler(), 4 passed and exactly 5 expected #462

Closed AronNovak closed 5 years ago

AronNovak commented 5 years ago

Drupal core: 8.6.16 Drush: 9.4.0.

When executing drush core-cron (and likely an error is generated)

Trace:

ArgumentCountError: Too few arguments to function drush_error_handler(), 4 passed and exactly 5 expected in /home/aaron/gizra/project-example/vendor/drush/drush/includes/environment.inc on line 21 #0 [internal function]: drush_error_handler(16384, 'The Drupal\\Core...', '/home/aaron/giz...', 5)
#1 /home/aaron/gizra/project-example/vendor/rollbar/rollbar/src/Handlers/ErrorHandler.php(38): call_user_func('drush_error_han...', 16384, 'The Drupal\\Core...', '/home/aaron/giz...', 5)
#2 [internal function]: Rollbar\Handlers\ErrorHandler->handle(16384, 'The Drupal\\Core...', '/home/aaron/giz...', 5, Array)
#3 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Entity/Query/QueryFactory.php(5): trigger_error('The Drupal\\Core...', 16384)
#4 /home/aaron/gizra/project-example/vendor/symfony/class-loader/ApcClassLoader.php(112): require('/home/aaron/giz...')
#5 [internal function]: Symfony\Component\ClassLoader\ApcClassLoader->loadClass('Drupal\\Core\\Ent...')
#6 /home/aaron/gizra/project-example/web/core/lib/Drupal/Component/DependencyInjection/Container.php(262): spl_autoload_call('Drupal\\Core\\Ent...')
#7 /home/aaron/gizra/project-example/web/core/lib/Drupal/Component/DependencyInjection/Container.php(171): Drupal\Component\DependencyInjection\Container->createService(Array, 'entity.query')
#8 /home/aaron/gizra/project-example/web/core/lib/Drupal.php(158): Drupal\Component\DependencyInjection\Container->get('entity.query')
#9 /home/aaron/gizra/project-example/web/modules/contrib/feeds/src/Plugin/Type/FeedsAnnotationFactory.php(26): Drupal::service('entity.query')
#10 /home/aaron/gizra/project-example/web/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\feeds\Plugin\Type\FeedsAnnotationFactory->createInstance('entity:node', Array)
#11 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php(62): Drupal\Component\Plugin\PluginManagerBase->createInstance('entity:node', Array)
#12 /home/aaron/gizra/project-example/web/core/lib/Drupal/Component/Plugin/LazyPluginCollection.php(80): Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin('entity:node')
#13 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php(83): Drupal\Component\Plugin\LazyPluginCollection->get('entity:node')
#14 /home/aaron/gizra/project-example/web/modules/contrib/feeds/src/Feeds/FeedsSingleLazyPluginCollection.php(47): Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->setConfiguration(Array)
#15 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php(99): Drupal\feeds\Feeds\FeedsSingleLazyPluginCollection->setConfiguration(Array)
#16 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php(55): Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->addInstanceId('entity:node', Array)
#17 /home/aaron/gizra/project-example/web/modules/contrib/feeds/src/Feeds/FeedsSingleLazyPluginCollection.php(38): Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->__construct(Object(Drupal\feeds\Plugin\Type\FeedsPluginManager), 'entity:node', Array)
#18 /home/aaron/gizra/project-example/web/modules/contrib/feeds/src/Entity/FeedType.php(499): Drupal\feeds\Feeds\FeedsSingleLazyPluginCollection->__construct(Object(Drupal\feeds\Plugin\Type\FeedsPluginManager), 'entity:node', Array, Object(Drupal\feeds\Entity\FeedType))
#19 /home/aaron/gizra/project-example/web/modules/contrib/feeds/src/Entity/FeedType.php(420): Drupal\feeds\Entity\FeedType->getPluginCollections()
#20 /home/aaron/gizra/project-example/web/modules/contrib/feeds/src/Entity/FeedType.php(383): Drupal\feeds\Entity\FeedType->getPlugin('fetcher')
#21 /home/aaron/gizra/project-example/web/modules/contrib/feeds/src/Entity/Feed.php(480): Drupal\feeds\Entity\FeedType->getPlugins()
#22 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(471): Drupal\feeds\Entity\Feed->preSave(Object(Drupal\feeds\FeedStorage))
#23 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(630): Drupal\Core\Entity\EntityStorageBase->doPreSave(Object(Drupal\feeds\Entity\Feed))
#24 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(426): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object(Drupal\feeds\Entity\Feed))
#25 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(774): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\feeds\Entity\Feed))
#26 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Entity/Entity.php(390): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\feeds\Entity\Feed))
#27 /home/aaron/gizra/project-example/web/modules/contrib/feeds/feeds.module(50): Drupal\Core\Entity\Entity->save()
#28 [internal function]: feeds_cron()
#29 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(392): call_user_func_array('feeds_cron', Array)
#30 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Cron.php(235): Drupal\Core\Extension\ModuleHandler->invoke('feeds', 'cron')
#31 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/Cron.php(133): Drupal\Core\Cron->invokeCronHandlers()
#32 /home/aaron/gizra/project-example/web/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()
AronNovak commented 5 years ago

Actually it's almost certainly a Drush issue: https://gist.githubusercontent.com/AronNovak/33d0db8ea460ec5989c2d703cd3c8ad7/raw/d88af30312633dc8a337685253539bd683849cfb/drush-error-handler-rollbar.patch

(in the latest version of Drush, this function is not even there, that's why I created this gist for being able to patch)