Author Topic: PHP 7 -> PHP 8  (Read 193 times)

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 347
    • View Profile
PHP 7 -> PHP 8
« on: May 14, 2025, 05:37:32 pm »
After upgrading from PHP 7 -> PHP 8 when loading a saved stated with columns that uses remoteOptions, The checkboxes are not populated correctly but the filter is applied correctly. Any idea what could be causing this?

Update:
Noticed that quotes are missing from numeric values in PHP 8 version.

Response PHP 7:
Code: [Select]
{"data":[{"c":"1"}}
Response PHP 8:
Code: [Select]
{"data":[{"c":1}}
State has "1" (with quotes).

« Last Edit: May 14, 2025, 06:20:35 pm by queensgambit9 »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6394
    • View Profile
Re: PHP 7 -> PHP 8
« Reply #1 on: May 15, 2025, 05:27:41 pm »
IS {"data":[{"c":1}} data of host grid or the remote filter options?

Could you share a jsfiddle.

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 347
    • View Profile
Re: PHP 7 -> PHP 8
« Reply #2 on: May 15, 2025, 07:30:08 pm »
Solved, it's in the response from the db.
Seems as from PHP 8.1 PDO has been changed so that when MySQL returns an integer it will no longer be returned as a string.
« Last Edit: May 15, 2025, 07:47:16 pm by queensgambit9 »