TypeError thrown
implode(): Argument #2 ($array) must be of type ?array, string given