TypeError thrown

pathinfo(): Argument #1 ($path) must be of type string, array given