Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recording in accounting section for Sales or Purchases error with PostGreSql #30353

Closed
Ericl92220 opened this issue Jul 11, 2024 · 2 comments
Closed
Labels
Bug This is a bug (something does not work as expected)

Comments

@Ericl92220
Copy link

Bug

Hello,

On a fresh Dolibarr installation with PostGreSql,
Click on "recording in accounting" section for "Sales" or "Purchases" produces a white page
The "Bank" section is OK
No PB with a MySQL database configuration

(Error below in the web server's logs)

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: pg_num_rows(): Argument #1 ($result) must be of type PgSql\Result, bool given in /dlb_dmo_pgsql/htdocs/core/db/pgsql.class.php:652\nStack trace:
\n#0 /dlb_dmo_pgsql/htdocs/core/db/pgsql.class.php(652): pg_num_rows()
\n#1 /dlb_dmo_pgsql/htdocs/accountancy/journal/sellsjournal.php(400): DoliDBPgsql->num_rows()
\n#2 {main}\n thrown in /dlb_dmo_pgsql/htdocs/core/db/pgsql.class.php on line 652'

Regards,

Dolibarr Version

Dolibarr 19.0.2

Environment PHP

PHP 8.2.20

Environment Database

PostgreSQL 15.7

Steps to reproduce the behavior and expected behavior

Go to the accounting tab
Click on "Recording in accounting" (Sales or Purchases)

Attached files

No response

@Ericl92220 Ericl92220 added the Bug This is a bug (something does not work as expected) label Jul 11, 2024
@mkaag
Copy link

mkaag commented Aug 19, 2024

Same here with Dolibarr 19.0.0 and FreeBSD 14.0p9 (php and postgresql15 are the very same):

[Mon Aug 19 18:51:17.926772 2024] [proxy_fcgi:error] [pid 7178:tid 34393495296] [client 10.67.0.176:39930] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: pg_num_rows(): Argument #1 ($result) must be of type PgSql\Result, bool given in /usr/local/www/dolibarr-19.0.0/htdocs/core/db/pgsql.class.php:652\nStack trace:\n#0 /usr/local/www/dolibarr-19.0.0/htdocs/core/db/pgsql.class.php(652): pg_num_rows()\n#1 /usr/local/www/dolibarr-19.0.0/htdocs/accountancy/journal/sellsjournal.php(400): DoliDBPgsql->num_rows()\n#2 {main}\n thrown in /usr/local/www/dolibarr-19.0.0/htdocs/core/db/pgsql.class.php on line 652', referer: http://dolibarr.example.com/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy

@hregis
Copy link
Contributor

hregis commented Aug 19, 2024

@mkaag this PR fix this bug, thanks : #30678

@hregis hregis closed this as completed Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

3 participants