Skip to content
Permalink
Browse files

postgres providers: null values in array don't need curly braces

  • Loading branch information
jef-n committed Jan 31, 2017
1 parent 7bc3bfd commit b52b5770e39ba6b89f4631e888b1b81173a5dcfc
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/providers/postgres/qgspostgresprovider.cpp
@@ -3997,7 +3997,8 @@ QString QgsPostgresProvider::description() const

static void jumpSpace( const QString& txt, int& i )
{
while ( i < txt.length() && txt.at( i ).isSpace() ) ++i;
while ( i < txt.length() && txt.at( i ).isSpace() )
++i;
}

static QString getNextString( const QString& txt, int& i, const QString& sep )
@@ -4092,7 +4093,8 @@ static QVariant parseArray( const QString& txt, QVariant::Type type, QVariant::T
{
if ( !txt.startsWith( '{' ) || !txt.endsWith( '}' ) )
{
QgsLogger::warning( "Error parsing array, missing curly braces: " + txt );
if( !txt.isEmpty() )
QgsLogger::warning( "Error parsing array, missing curly braces: " + txt );
return QVariant( type );
}
QString inner = txt.mid( 1, txt.length() - 2 );

0 comments on commit b52b577

Please sign in to comment.
You can’t perform that action at this time.