Misc/Errors

* Item/XML
    - fixed setting typeId when lookup was item name
    - fixed lookup by name with utf8-chars
 * Items
    - do not display page for invalid categories
 * NPC
    - fixed reputation display
 * Quest
    - broke infinite loop occuring when quest is in chain with itself
 * Filters
    - handle different sizes of cr, crs and crv passed
This commit is contained in:
Sarjuuk
2017-04-08 03:05:30 +02:00
parent bb00355ca3
commit 33b1e4a978
6 changed files with 45 additions and 12 deletions

View File

@@ -229,7 +229,8 @@ class GenericPage
case 0: // no params works always
return true;
case 1: // null is valid || value in a 1-dim-array || key for a n-dim-array
return $this->category[0] === null || in_array($this->category[0], $this->validCats) || !empty($this->validCats[$this->category[0]]);
$filtered = array_filter($this->validCats, function ($x) { return is_int($x); });
return $this->category[0] === null || in_array($this->category[0], $filtered) || !empty($this->validCats[$this->category[0]]);
case 2: // first param has to be a key. otherwise invalid
if (!isset($this->validCats[$this->category[0]]))
return false;