WebDev

SMF Arcade => SMF Arcade Support + Plugins => Topic started by: Duban Black on May 02, 2025, 07:30:57 PM

Title: 2: Undefined array key "integrate_arcade_score"
Post by: Duban Black on May 02, 2025, 07:30:57 PM
When the game ends and my score should be saved this error appears:

index.php?act=Arcade&do=newscore
/home/u964766853/domains/harrypotterhead.com/public_html/foro/ArcadeSources/ArcadeGame.php (Line 967)

message error:

2: Undefined array key "integrate_arcade_score"

#0: smf_error_handler()
Llamado desde /home/u964766853/domains/harrypotterhead.com/public_html/foro/ArcadeSources/ArcadeGame.php en línean 967
#1: ArcadeSubmit()
Llamado desde /home/u964766853/domains/harrypotterhead.com/public_html/foro/Sources/Arcade.php en línean 879
#2: Arcade()
Llamado desde /home/u964766853/domains/harrypotterhead.com/public_html/foro/Sources/ArcadeHooks.php en línean 92
#3: Arcade_game_support()
Llamado desde /home/u964766853/domains/harrypotterhead.com/public_html/foro/Sources/Subs.php en línean 5798
#4: call_integration_hook()
Llamado desde /home/u964766853/domains/harrypotterhead.com/public_html/foro/index.php en línean 269
#5: smf_main()
Llamado desde /home/u964766853/domains/harrypotterhead.com/public_html/foro/index.php en línean 196

Line 967 is:

$getScoreHooks = explode(',', $modSettings['integrate_arcade_score']);
How can I fix it?
Title: Re: 2: Undefined array key "integrate_arcade_score"
Post by: Chen Zhen on May 02, 2025, 11:45:26 PM

This never surfaced in testing & was part of the recent update.
It will be fixed in the next release.

For now, you can change that line to this:
$getScoreHooks = !empty($modSettings['integrate_arcade_score']) ? explode(',', $modSettings['integrate_arcade_score']) : [];

Thanks for the report.

Title: Re: 2: Undefined array key "integrate_arcade_score"
Post by: Duban Black on May 03, 2025, 01:01:47 PM
worked well, thank you very much
EhPortal 1.40.0 © 2025, WebDev