Fix the following warning:
Warning: Undefined property: PgSql\Result::$num_rows in
/var/www/html/accountancy/bookkeeping/listbyaccount.php on line 160
The warning is happening when listing the operations after the
accounting setup is done but no accounts for bank nor operations are
created.
`WHERE xx IN ()` is not allowed in PostgreSQL queries, and result in
fatal errors.
We can check whether we have valid invoices before running the query,
since the query will only check whether the invoices are complete or
not.
It also fixes the following error on the development PHP output:
Fatal error: Uncaught TypeError: pg_num_rows(): Argument #1 ($result)
must be of type PgSql\Result, bool given in
/var/www/html/core/db/pgsql.class.php:654 Stack trace: #0
/var/www/html/core/db/pgsql.class.php(654): pg_num_rows(false) #1
/var/www/html/accountancy/journal/expensereportsjournal.php(264):
DoliDBPgsql->num_rows(false) #2 {main} thrown in
/var/www/html/core/db/pgsql.class.php on line 654
Refs #32374 but for the expensereportsjournal page.
`WHERE xx IN ()` is not allowed in PostgreSQL queries, and result in the
following fatal error:
GROUP BY fk_facture_fourn
33 DoliDBPgsql::query SQL Error message: ERROR: 42601: syntax error at or near ")"
LINE 10: AND fk_facture_fourn IN ()
^
We can check whether we have valid invoices before running the query,
since the query will only check whether the invoices are complete or
not.
It also fixes the following error on the development PHP output.
Fatal error: Uncaught TypeError: pg_num_rows(): Argument #1
($result) must be of type PgSql\Result, bool given in
/var/www/html/core/db/pgsql.class.php:654 Stack trace: #0
/var/www/html/core/db/pgsql.class.php(654): pg_num_rows(false) #1
/var/www/html/accountancy/journal/purchasesjournal.php(418):
DoliDBPgsql->num_rows(false) #2 {main} thrown in
/var/www/html/core/db/pgsql.class.php on line 654
Fixes#32374
Fix the following warning:
Warning: Undefined property: PgSql\Result::$num_rows in
/var/www/html/accountancy/bookkeeping/listbyaccount.php on line 160
The warning is happening when listing the operations after the
accounting setup is done but no accounts for bank nor operations are
created.
`WHERE xx IN ()` is not allowed in PostgreSQL queries, and result in
fatal errors.
We can check whether we have valid invoices before running the query,
since the query will only check whether the invoices are complete or
not.
It also fixes the following error on the development PHP output:
Fatal error: Uncaught TypeError: pg_num_rows(): Argument #1 ($result)
must be of type PgSql\Result, bool given in
/var/www/html/core/db/pgsql.class.php:654 Stack trace: #0
/var/www/html/core/db/pgsql.class.php(654): pg_num_rows(false) #1
/var/www/html/accountancy/journal/expensereportsjournal.php(264):
DoliDBPgsql->num_rows(false) #2 {main} thrown in
/var/www/html/core/db/pgsql.class.php on line 654
Refs #32374 but for the expensereportsjournal page.
`WHERE xx IN ()` is not allowed in PostgreSQL queries, and result in the
following fatal error:
GROUP BY fk_facture_fourn
33 DoliDBPgsql::query SQL Error message: ERROR: 42601: syntax error at or near ")"
LINE 10: AND fk_facture_fourn IN ()
^
We can check whether we have valid invoices before running the query,
since the query will only check whether the invoices are complete or
not.
It also fixes the following error on the development PHP output.
Fatal error: Uncaught TypeError: pg_num_rows(): Argument #1
($result) must be of type PgSql\Result, bool given in
/var/www/html/core/db/pgsql.class.php:654 Stack trace: #0
/var/www/html/core/db/pgsql.class.php(654): pg_num_rows(false) #1
/var/www/html/accountancy/journal/purchasesjournal.php(418):
DoliDBPgsql->num_rows(false) #2 {main} thrown in
/var/www/html/core/db/pgsql.class.php on line 654
Fixes#32374