diff --git a/lib/ApiDefintion.php b/lib/ApiDefintion.php index 7d35f89..a1b9f2f 100644 --- a/lib/ApiDefintion.php +++ b/lib/ApiDefintion.php @@ -170,14 +170,12 @@ abstract class ApiDefintion */ protected function getCategoryIndex(string $value, int $index) { - $i = -1; + $i = 0; foreach ($this->aipdbApiCategories as $cat){ - - $i++; - if ($cat[$index] === $value) { return $i; } + $i++; } // not found