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

Blank Dashboard V19.0.3 when enabling PHP8.1 #30890

Closed
erikvanberkum opened this issue Sep 7, 2024 · 13 comments
Closed

Blank Dashboard V19.0.3 when enabling PHP8.1 #30890

erikvanberkum opened this issue Sep 7, 2024 · 13 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@erikvanberkum
Copy link
Contributor

Bug

Today update my dolibarr installation to 19.0.3 and PHP to version 8.1.
This results in a Blank dashboard home screen all users.
Switching back to 7.4 the dashboard screen is good again, but with the following warning.

A non-numeric value encountered (/var/www/html/dolibarr/htdocs/ticket/class/ticket.class.php:3054)

Staying on PHP7.4 for now.

Dolibarr Version

19.0.3

Environment PHP

PHP8.1

Environment Database

mysql

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

@erikvanberkum erikvanberkum added the Bug This is a bug (something does not work as expected) label Sep 7, 2024
@hregis
Copy link
Contributor

hregis commented Sep 7, 2024

@erikvanberkum Do you have any external modules? and do you have the apache/php logs when you have this blank page with php8.1?

@erikvanberkum
Copy link
Contributor Author

I did disable all external modules that did not make a difference.
Have to check the logs if i can find somethings, just reading out from the error handler at the bottom.

@erikvanberkum
Copy link
Contributor Author

PHP Fatal error: Uncaught TypeError: Unsupported operand types: string + int in /var/www/html/dolibarr/htdocs/ticket/class/ticket.class.php:3045\nStack trace:\n#0 /var/www/html/dolibarr/htdocs/index.php(243): Ticket->load_board()\n#1 {main}\n thrown in /var/www/html/dolibarr/htdocs/ticket/class/ticket.class.php on line 3045

@hregis
Copy link
Contributor

hregis commented Sep 7, 2024

@erikvanberkum That's strange, what do you have on line 3045?

@erikvanberkum
Copy link
Contributor Author

ticketclass

@erikvanberkum
Copy link
Contributor Author

sorry 3054 and 3045
ticketclass2

@hregis
Copy link
Contributor

hregis commented Sep 7, 2024

@erikvanberkum
it is possible to have this error with this :

$datelimit = $this->db->jdate($obj->datec) + $delay_warning;

but not with this! it's strange!

$response->label = $label;

@hregis
Copy link
Contributor

hregis commented Sep 7, 2024

@erikvanberkum try to change 3054

$datelimit = (int) $this->db->jdate($obj->datec) + (int) $delay_warning;

@hregis
Copy link
Contributor

hregis commented Sep 7, 2024

@erikvanberkum are you sure it's 19.0.3 and not 19.0.2 ?

@erikvanberkum
Copy link
Contributor Author

$datelimit = (int) $this->db->jdate($obj->datec) + (int) $delay_warning;

changed to this on version 19.0.3 and enabled php 8.1 now working without error

@erikvanberkum
Copy link
Contributor Author

erikvanberkum commented Sep 7, 2024

1903

Went through the upgrade.
Did not get any error during the process.

@hregis
Copy link
Contributor

hregis commented Sep 7, 2024

$datelimit = (int) $this->db->jdate($obj->datec) + (int) $delay_warning;

changed to this on version 19.0.3 and enabled php 8.1 now working without error

@erikvanberkum ok good.... but this is the line 3054 ! and this line is for 19.0.2 ! big strange :-)

@erikvanberkum
Copy link
Contributor Author

erikvanberkum commented Sep 8, 2024

@hregis I have redownloaded the file from sourceforge:
https://sourceforge.net/projects/dolibarr/files/Dolibarr%20ERP-CRM/19.0.3/ zip version
Open the file and it looks like no error on my side with copy files:
Screenshot 2024-09-09 081252
Maybe the commit is not committed to the 19.0.3 branch?

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

2 participants