**List of steps to reproduce** (step by step, including full links if applicable):
* Install Extension:Arrays and Extension:CirrusSearch
* Create a page with this content:
```
{{#arraydefine:s|,t,|,|unique}}
```
**What happens?**:
* CirrusSearch parses the page and throws an exception
> ErrorException from line 155 of /path/to/wiki/extensions/Arrays/ExtArrays.php: PHP Notice: Undefined offset: 0
Which is the following if
```
if ( count( $array ) === 1 && $array[0] === '' ) {
$array = [];
}
```
**What should have happened instead?**:
The page should get parser without exception.
**Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc**:
* MediaWiki 1.35.3
* Extension:Arrays 2.2.0 (e09d743)
* Extension:CirrusSearch 6.5.4 (203237e)
**Possible fix:**
The `array_unique()` function in the same file
```
protected static function array_unique( array $array ) {
return array_filter( array_unique( $array ), static function ( $value ) {
return $value !== '';
} );
}
```
uses `array_filter()` which breaks the assumption that an array with 1 element would have an element with index `0`, wrapping it in `array_values()` should fix this without changing any behavior of the extension.