I upgrading to php-8.1.0 and having a problem with a few pages. Not sure what you will need to troubleshoot this issue, or if it is an issue with your code at all. Please advise.
https://gist.github.com/tmoore88/93c8ecb5ef88c734ce6008723c3e102e
Thanks
Tim
Hello,
To debug the issue, You can try following:
- Open the grid on browser
- Open file lib/inc/jqgrid_dist.php and set display_error option to “on” on top of file.
- Go back to the grid on browser, and reload grid from grid toolbar.
It should show the error details in the error box. Share the details and I will try to suggest some solution.
We can also have remote session to debug this case. Email me your time zone and availability on [email protected]
Abu,
Unfortunately, this did not change the error. It still just says error with no information, I will email you with availability and time zone.
Thanks
Tim
Can you please check php error log for details. Blank shows that error display is off and error details are logged in log file. Without that I can’t tell the reason and solution.
We can have a remote session as well. For that please email me your available time and timezone at [email protected]
Abu,
After following your instructions. This function, that totals the sums was causing the issue.
PHP LOG – [07-Feb-2022 19:52:09 Europe/Berlin] PHP Fatal error: Uncaught Type Error: Unsupported operand types: string + string in C:\xampp\htdocs\Kodiaccess_test\time_week_o.php:646
Once I read the error in the logs, the error was easy to fix. I was trying to add strings using a + symbol.
OLD CODE:
function calc_cost2($data){
return number_format((float)$data[“ot_mon”] + $data[“ot_tue”] + $data[“ot_wed”] + $data[“ot_thu”] + $data[“ot_fri”] + $data[“ot_sat”] + $data[“ot_sun”], 2, ‘.’, ”); }
Changed to:
function calc_cost2($data){
return number_format((float)$data[“ot_mon”] + (float)$data[“ot_tue”] + (float)$data[“ot_wed”] + (float)$data[“ot_thu”] + (float)$data[“ot_fri”] + (float)$data[“ot_sat”] + (float)$data[“ot_sun”], 2, ‘.’, ”); }
This issue was resolved. Just lazy code on my part that used to work in 7.
Thanks
Tim
Thanks for updating.