Skip to content

Commit

Permalink
Fix Deprecated Functionality: explode(): Passing null to parameter ma…
Browse files Browse the repository at this point in the history
…copedia#2 ($string) of type string is deprecated
  • Loading branch information
oviliz committed Dec 2, 2023
1 parent b19132d commit ecda830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Console/Command/CategoriesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (!$path) {
throw new LocalizedException(__('Please specify path to file! (eg. "var/import/categories.csv")'));
}
$additionalHeadersDefinedByUser = explode(',', $input->getOption('additional'));
$additionalHeadersDefinedByUser = $input->getOption('additional') ? explode(',', $input->getOption('additional')) : [];
$this->additionalHeaders = array_merge($this->additionalHeaders, $additionalHeadersDefinedByUser);

$file = $this->directoryList->getRoot() . '/' . $path;
Expand Down

0 comments on commit ecda830

Please sign in to comment.