Bug disabling trophies causes postbit error

Status
Not open for further replies.

1-X

New member
Me again :)

When viewing any thread I was seeing this error repeated at the top of the page. I disabled all addons and re-enabled them in turn, which confirmed it's related to vbarcade.

Warning: array_key_exists() expects parameter 2 to be array, null given in [path]/includes/class_postbit.php(340) : eval()'d code on line 6

It only happens when "Maximum Postbit Trophies" is set to 0, any other value and the error disappears.

Also, I get a similar error when I try to import a "local scoring" mochi game, namely

Warning: in_array() expects parameter 2 to be array, null given in [path]/dbtech/vbarcade/systems/moc.php on line 152
 
For the postbit, edit the plugin: vBArcade - Render Postbit Trophies, find:

PHP:
if (array_key_exists($post['userid'], $trophies))

replace with

PHP:
if (is_array($trophies) AND array_key_exists($post['userid'], $trophies))
the second one is known, but harmless.
 
Status
Not open for further replies.

Legacy vBArcade

vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
902
Customer rating
0.00 star(s) 0 ratings
Back
Top