TypeError thrown

array_merge(): Argument #3 must be of type array, null given