# Fix for DataTables warning on Clients screen and type bool error on groups.php line 208

**URL:** <https://discourse.pi-hole.net/t/fix-for-datatables-warning-on-clients-screen-and-type-bool-error-on-groups-php-line-208/66224>\
**Category:** Customizing Pi-hole\
**Created:** [November 10, 2023, 11:44pm UTC](https://discourse.pi-hole.net/t/fix-for-datatables-warning-on-clients-screen-and-type-bool-error-on-groups-php-line-208/66224 "2023-11-10T23:44:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![steverobinson](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@steverobinson](https://discourse.pi-hole.net/u/steverobinson)\
**Post date:** [November 10, 2023, 11:44pm UTC](https://discourse.pi-hole.net/t/fix-for-datatables-warning-on-clients-screen-and-type-bool-error-on-groups-php-line-208/66224/1 "2023-11-10T23:44:30Z")

</div>

Posting this here in case it helps others and if someone more familiar with the project feels it should be a PR, maybe convert it into one.

My Pi-Hole instance somehow ended up with a client in the database without a name. I don't know how that happened, but it did.

This resulted in an error message popup in the web UI that read:

> DataTables warning: table id=clientsTable - Invalid JSON response. For more information about this error, please see [http://datatables.net/tn/1](http://datatables.net/tn/1)

It also resulted in a repeated entry in the log:

`Trying to access array offset on value of type bool in /var/www/pihole/admin/scripts/pi-hole/php/groups.php on line 208`

I fixed the problem by editing admin/scripts/pi-hole/php/groups.php and changing line 208 from:

`$res['name'] = $name_result['name'];`

to:

`$res['name'] = is_array($name_result) ? $name_result['name'] : '';`

Once I did this, I could clearly see the client without a name and work within the system again.

I hope this helps the next guy/gal and if someone more confident this wasn't a stupid move wants to convert this into a PR, that would be wonderful.

Related:

- [Client group management issue](https://discourse.pi-hole.net/t/client-group-management-issue/46202/29)
- [DataTables warning: table id=customDNSTable](https://discourse.pi-hole.net/t/datatables-warning-table-id-customdnstable/35744)

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [December 3, 2023, 2:55am UTC](https://discourse.pi-hole.net/t/fix-for-datatables-warning-on-clients-screen-and-type-bool-error-on-groups-php-line-208/66224/3 "2023-12-03T02:55:20Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
