Sarjuuk / aowow

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

import zones bug: Exception - in_array(): Argument #2 ($haystack) must be of type array, bool given /var/www/vhosts/httpdocs/aowow/setup/tools/sqlgen/zones.func.php(165) #0 /var/www/vhosts/httpdocs/aowow/setup/tools/sqlgen/zones.func.php(165): in_array() #352

Closed Krutok closed 6 months ago

Krutok commented 2 years ago

I downloed fresh with git clone https://github.com/TrinityCore/aowow.git Bug found with begin import the zones:

script have a bug by me in the script: xxxxxx@xxxx:~/httpdocs/aowow$ php aowow --setup 14:35:51 FileGen::init() - creating required directories 14:35:51 created 8 extra paths

14:35:51 [INFO] Found firstrun progression info. (Halted on subscript zones)

continue setup? (y/n): 14:35:53 Resuming setup from step 44... 14:35:54 SqlGen::generate() - filling aowow_zones with data

14:35:54 indexing game data from setup/mpqdata/ for first time use... 14:36:01 done

14:36:01 - reading worldmaptransforms.dbc 14:36:01 - reading worldmaparea.dbc 14:36:01 - reading and merging map.dbc for locales 3 14:36:01 - reading mapdifficulty.dbc 14:36:01 - reading and merging areatable.dbc for locales 3 14:36:01 - reading and merging lfgdungeons.dbc for locales 3 14:36:01 - reading battlemasterlist.dbc 14:36:01 - reading dungeonmap.dbc Exception - in_array(): Argument #2 ($haystack) must be of type array, bool given /var/www/vhosts/httpdocs/aowow/setup/tools/sqlgen/zones.func.php(165)

0 /var/www/vhosts/httpdocs/aowow/setup/tools/sqlgen/zones.func.php(165): in_array()

1 /var/www/vhosts/httpdocs/aowow/setup/tools/sqlGen.class.php(239): SetupScript@anonymous->generate()

2 /var/www/vhosts/httpdocs/aowow/setup/tools/clisetup/setup.func.php(292): SqlGen::generate()

3 /var/www/vhosts/httpdocs/aowow/setup/setup.php(40): setup()

4 /var/www/vhosts/httpdocs/aowow/aowow(10): require('...')

5 {main}

Krutok commented 9 months ago

@Sarjuuk can you help me with this Problem?

Sarjuuk commented 7 months ago

could not reproduce.

but the error can only mean this query failed: https://github.com/Sarjuuk/aowow/blob/master/setup/tools/sqlgen/zones.func.php#L156

In such cases enable DEBUG in siteconfig and the setup will dispaly the error and exit.

Krutok commented 7 months ago

Ohh after such a long time I get an answer ^^ But the error still occurs. And always with the zones. Now how can you fix this?

Sarjuuk commented 7 months ago

i can't if you do not give me the sql error as i said earlier. Or confirm that none are given.

But generally DB::Aoww()->selectCol() only returns a boolean if something broke.