Skip to content

Commit b52b577

Browse files
committed
postgres providers: null values in array don't need curly braces
1 parent 7bc3bfd commit b52b577

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/providers/postgres/qgspostgresprovider.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -3997,7 +3997,8 @@ QString QgsPostgresProvider::description() const
39973997

39983998
static void jumpSpace( const QString& txt, int& i )
39993999
{
4000-
while ( i < txt.length() && txt.at( i ).isSpace() ) ++i;
4000+
while ( i < txt.length() && txt.at( i ).isSpace() )
4001+
++i;
40014002
}
40024003

40034004
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
40924093
{
40934094
if ( !txt.startsWith( '{' ) || !txt.endsWith( '}' ) )
40944095
{
4095-
QgsLogger::warning( "Error parsing array, missing curly braces: " + txt );
4096+
if( !txt.isEmpty() )
4097+
QgsLogger::warning( "Error parsing array, missing curly braces: " + txt );
40964098
return QVariant( type );
40974099
}
40984100
QString inner = txt.mid( 1, txt.length() - 2 );

0 commit comments

Comments
 (0)