TypeError thrown

implodir(): Argument #2 ($matriz) must be of type ?matriz, string given