TypeError thrown

preg_split() expects parameter 2 to be string, null given