Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WS-505: Fixing PHP warnings. #685

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ class FoiaUploadXmlMigrationPostImportSubscriber implements EventSubscriberInter
*/
protected $entityTypeManager;

/**
* The event dispatcher.
*
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;

/**
* The messenger.
*
Expand Down Expand Up @@ -155,7 +162,7 @@ public function savePartial(MigrationInterface $migration, Row $row) {
* Gets the event dispatcher.
*
* @return \Symfony\Component\EventDispatcher\EventDispatcherInterface
* Return Event Dispatcher servicce if it isn't already set
* Return Event Dispatcher service if it isn't already set
*/
private function getEventDispatcher() {
if (!$this->eventDispatcher) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public function processRow(Row $row, array $process = NULL, $value = NULL) {
* message.
*/
protected function getFailureHandler(\Exception $e) {
$failedMethod = reset($e->getTrace());
$trace = $e->getTrace();
$failedMethod = reset($trace);
$container = \Drupal::getContainer();
if ($failedMethod['class'] === Extract::class && $e->getMessage() == 'Input should be an array.') {
return new SectionMissing($e, $container->get('messenger'), $this->migration, $container->get('string_translation'));
Expand Down
Loading