classes/PodsMigrate.php
public function str_getcsv( $line, $delimiter = ',', $enclosure = '"', $escape = '\\' ) {

		$line = str_replace( "\r\n", "\n", $line );
		$line = str_replace( "\r", "\n", $line );

		if ( '\n' !== $delimiter && function_exists( 'str_getcsv' ) ) {
			return str_getcsv( $line, $delimiter, $enclosure, $escape );
		}

		$delimiter = str_replace( '/', '\/', $delimiter );
		$enclosure = preg_quote( $enclosure, '/' );

		$split = "/{$delimiter}(?=(?:[^{$enclosure}]*{$enclosure}[^{$enclosure}]*{$enclosure})*(?![^{$enclosure}]*{$enclosure}))/";

		$data = preg_split( $split, trim( $line ), - 1, PREG_SPLIT_NO_EMPTY );

		if ( '\n' !== $delimiter ) {
			$data = preg_replace( "/^{$enclosure}(.*){$enclosure}$/s", '$1', $data );
		}

		return $data;
	}
public function str_getcsv( $line, $delimiter = ',', $enclosure = '"', $escape = '\\' ) {

		$line = str_replace( "\r\n", "\n", $line );
		$line = str_replace( "\r", "\n", $line );

		if ( '\n' !== $delimiter && function_exists( 'str_getcsv' ) ) {
			return str_getcsv( $line, $delimiter, $enclosure, $escape );
		}

		$delimiter = str_replace( '/', '\/', $delimiter );
		$enclosure = preg_quote( $enclosure, '/' );

		$split = "/{$delimiter}(?=(?:[^{$enclosure}]*{$enclosure}[^{$enclosure}]*{$enclosure})*(?![^{$enclosure}]*{$enclosure}))/";

		$data = preg_split( $split, trim( $line ), - 1, PREG_SPLIT_NO_EMPTY );

		if ( '\n' !== $delimiter ) {
			$data = preg_replace( "/^{$enclosure}(.*){$enclosure}$/s", '$1', $data );
		}

		return $data;
	}
public function str_getcsv ( $ line , $ delimiter = ',' , $ enclosure = '"' , $ escape = '\\' ) { $ line = str_replace ( "\r\n" , "\n" , $ line ) ; $ line = str_replace ( "\r" , "\n" , $ line ) ; if ( '\n' !== $ delimiter && function_exists ( 'str_getcsv' ) ) { return str_getcsv ( $ line , $ delimiter , $ enclosure , $ escape ) ; } $ delimiter = str_replace ( '/' , '\/' , $ delimiter ) ; $ enclosure = preg_quote ( $ enclosure , '/' ) ; $ split = "/{$delimiter}(?=(?:[^{$enclosure}]*{$enclosure}[^{$enclosure}]*{$enclosure})*(?![^{$enclosure}]*{$enclosure}))/" ; $ data = preg_split ( $ split , trim ( $ line ) , - 1 , PREG_SPLIT_NO_EMPTY ) ; if ( '\n' !== $ delimiter ) { $ data = preg_replace ( "/^{$enclosure}(.*){$enclosure}$/s" , '$1' , $ data ) ; } return $ data ; }
Handle str_getcsv for cases where it's not set

@param        $line
@param string $delimiter
@param string $enclosure
@param string $escape

@return array|mixed
Handle str_getcsv for cases where it s not set