Fixed [E_WARNING] Undefined array key "extraFaIcons"

Xon

Well-known member
Affected version
2.3.0 Beta 2
When attempting to rebuild meta-data, the font awesome icon service keeps erroring:
Code:
$ php cmd.php xf:rebuild-master-data -v
Importing... Master data (Templates)
Rebuilding... templates . . .
Rebuilding... permissions (2620)
Rebuilding... permissions (10176)

In UsageAnalyzer.php line 566:

  [ErrorException]
  [E_WARNING] Undefined array key "extraFaIcons"


Exception trace:
  at /var/www/sites/src/XF/Service/Icon/UsageAnalyzer.php:566
 XF::handlePhpError() at /var/www/sites/src/XF/Service/Icon/UsageAnalyzer.php:566
 XF\Service\Icon\UsageAnalyzer->stepExtra() at /var/www/sites/src/XF/MultiPartRunnerTrait.php:88
 XF\Service\Icon\UsageAnalyzer->runLoop() at /var/www/sites/src/XF/Service/Icon/UsageAnalyzer.php:101
 XF\Service\Icon\UsageAnalyzer->analyze() at /var/www/sites/src/XF/Job/IconUsage.php:45
 XF\Job\IconUsage->run() at /var/www/sites/src/XF/Job/Atomic.php:40
 XF\Job\Atomic->run() at /var/www/sites/src/XF/Job/Manager.php:272
 XF\Job\Manager->runJobInternal() at /var/www/sites/src/XF/Job/Manager.php:202
 XF\Job\Manager->runJobEntry() at /var/www/sites/src/XF/Job/Manager.php:153
 XF\Job\Manager->runUnique() at /var/www/sites/src/XF/Cli/Command/JobRunnerTrait.php:32
 XF\Cli\Command\RebuildMasterData->runJob() at /var/www/sites/src/XF/Cli/Command/RebuildMasterData.php:31
 XF\Cli\Command\RebuildMasterData->execute() at /var/www/sites/src/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at /var/www/sites/src/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at /var/www/sites/src/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at /var/www/sites/src/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /var/www/sites/src/XF/Cli/Runner.php:111
 XF\Cli\Runner->run() at /var/www/sites/cmd.php:15
 
I thought I ran php cmd.php xf:upgrade between beta 1 and beta 2, but I'm not sure. But xf:rebuild-master-data probably should bail if the XF version doesn't match the expected as it is lacking an explicit check
 
Well that was silly, it looks like I had managed to overwrite the src/addons/XF folder with the wrong version. Restoring the right version and then re-running the installer worked.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.0 Beta 3).

Change log:
Fix undefined array key exception with the usage analyzer in a rare case if a dependent option is not available.
There may be a delay before changes are rolled out to the XenForo Community.
 
I don't envisage the code I just added is acutally necessary given the circumstances but either way this shouldn't be an issue now.
 
Back
Top Bottom