Sarjuuk / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
204 stars 217 forks source link

"Exception - [] operator not supported for strings" #349

Closed wodim closed 6 months ago

wodim commented 2 years ago

The following spell exists but generates an error page: https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?spell=34437

wodim commented 2 years ago

Another example - https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?spell=17547

Sarjuuk commented 2 years ago

No line number, so I can only guess. But it's probably just not up to date.

wodim commented 2 years ago

The same thing happens in rising-gods.

https://db.rising-gods.de/?spell=17547

Even though I am not an admin there and thus I can't see the traceback, you can see that the error that you get is different from the error that you would get from any other spell ID that does not exist.

https://db.rising-gods.de/?spell=123123

Ikatzuki commented 2 years ago

Here is the full error that I get when going spell ID: 34437

Please note that I'm working with custom spell data so some of the errors might be unrelated but this one should be unchanged and I get the same issue as Wodim of not being able to view the page for this spell.

One or more errors occured, while generating this page. Exception - [] operator not supported for strings @ C:\xampp\htdocs\includes\smartAI.class.php:173

0 C:\xampp\htdocs\includes\smartAI.class.php(81): SmartAI::getActionOwner(Array, 0)

1 C:\xampp\htdocs\pages\spell.php(328): SmartAI::getOwnerOfSpellCast(34437)

2 C:\xampp\htdocs\pages\genericPage.class.php(361): SpellPage->generateContent()

3 C:\xampp\htdocs\pages\genericPage.class.php(676): GenericPage->prepareContent()

4 C:\xampp\htdocs\index.php(120): GenericPage->display()

5 {main}

Sarjuuk commented 2 years ago

Yes rising gods is currently outdated. Yes this error should be gone with the latest version. https://github.com/Sarjuuk/aowow/commit/c0e9159c1e228136042c2aa7268056f2adc839ad#diff-b16f5dd57c428a3b56f1c98b6367db74a50e7c1cba30670056c7501417def466 (Thanks @Ikatzuki)

If not, @jackpoz, say something.

Jinnaix commented 2 years ago

Works on c0e9159c1e228136042c2aa7268056f2adc839ad

wodim commented 2 years ago

Not sure if related:

https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?npc=14469

Exception - The arguments array must contain 8 items, 1 given @ /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/localization/lang.class.php:511
#0 /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/localization/lang.class.php(511): vsprintf()
#1 /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/localization/lang.class.php(108): Lang::vspf()
#2 /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/includes/smartAI.class.php(1610): Lang::__callStatic()
#3 /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/includes/smartAI.class.php(369): SmartAI->action()
#4 /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/includes/smartAI.class.php(1349): SmartAI->prepare()
#5 /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/includes/smartAI.class.php(369): SmartAI->action()
#6 /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/pages/npc.php(372): SmartAI->prepare()
#7 /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/pages/genericPage.class.php(367): NpcPage->generateContent()
#8 /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/pages/genericPage.class.php(701): GenericPage->prepareContent()
#9 /var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/index.php(127): GenericPage->display()
#10 {main}
jackpoz commented 2 years ago

I updated to https://github.com/Sarjuuk/aowow/commit/df1ba841c5a70e889bd7b689d495471f465606f7 :

wodim commented 2 years ago

https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?spell=4986

E_USER_WARNING - Lang - undefined property Lang::$spell['invisibilityType']['0'], called in spell.php:1888 @ /trinity/var/www/tcubuntu.northeurope.cloudapp.azure.com/html/aowow/localization/lang.class.php:92

wodim commented 6 months ago

https://aowow.trinitycore.info/?npc=14469 still doesn't work.

Sarjuuk commented 6 months ago

probably gone with f00ccedbd3aaa0411d559a2e081721c1f91399a4