protected function _splitCheck($parts, $char)
    {
        $string = $parts[0];

        for ($i = 0; $i < count($parts); $i++) {
            if ($this->_hasUnclosedQuotes($string)
                || $this->_hasUnclosedBrackets($string, '<>')
                || $this->_hasUnclosedBrackets($string, '[]')
                || $this->_hasUnclosedBrackets($string, '()')
                || substr($string, -1) == '\\') {
                if (isset($parts[$i + 1])) {
                    $string = $string . $char . $parts[$i + 1];
                } else {
                    $this->error = 'Invalid address spec. Unclosed bracket or quotes';
                    return false;
                }
            } else {
                $this->index = $i;
                break;
            }
        }

        return $string;
    }
protected function _splitCheck($parts, $char)
    {
        $string = $parts[0];

        for ($i = 0; $i < count($parts); $i++) {
            if ($this->_hasUnclosedQuotes($string)
                || $this->_hasUnclosedBrackets($string, '<>')
                || $this->_hasUnclosedBrackets($string, '[]')
                || $this->_hasUnclosedBrackets($string, '()')
                || substr($string, -1) == '\\') {
                if (isset($parts[$i + 1])) {
                    $string = $string . $char . $parts[$i + 1];
                } else {
                    $this->error = 'Invalid address spec. Unclosed bracket or quotes';
                    return false;
                }
            } else {
                $this->index = $i;
                break;
            }
        }

        return $string;
    }
protected function _splitCheck ( $ parts , $ char ) { $ string = $ parts [ 0 ] ; for ( $ i = 0 ; $ i < count ( $ parts ) ; $ i ++ ) { if ( $ this -> _hasUnclosedQuotes ( $ string ) || $ this -> _hasUnclosedBrackets ( $ string , '<>' ) || $ this -> _hasUnclosedBrackets ( $ string , '[]' ) || $ this -> _hasUnclosedBrackets ( $ string , '()' ) || substr ( $ string , - 1 ) == '\\' ) { if ( isset ( $ parts [ $ i + 1 ] ) ) { $ string = $ string . $ char . $ parts [ $ i + 1 ] ; } else { $ this -> error = 'Invalid address spec. Unclosed bracket or quotes' ; return false ; } } else { $ this -> index = $ i ; break ; } } return $ string ; }
A common function that will check an exploded string.

@param array $parts The exloded string.
@param string $char  The char that was exploded on.
@return mixed False if the string contains unclosed quotes/brackets, or the string on success.
A common function that will check an exploded string .