# Error: Trying to access array offset on value of type bool error in HitRepository.php

**URL:** <https://forum.mautic.org/t/error-trying-to-access-array-offset-on-value-of-type-bool-error-in-hitrepository-php/25007>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [August 10, 2022, 2:08am UTC](https://forum.mautic.org/t/error-trying-to-access-array-offset-on-value-of-type-bool-error-in-hitrepository-php/25007 "2022-08-10T02:08:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![growthlab](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/growthlab/32/2029_2.png) [@growthlab](https://forum.mautic.org/u/growthlab)\
**Post date:** [August 10, 2022, 2:08am UTC](https://forum.mautic.org/t/error-trying-to-access-array-offset-on-value-of-type-bool-error-in-hitrepository-php/25007/1 "2022-08-10T02:08:59Z")

</div>

**Your software**  
My Mautic version is: 4.4.1  
My PHP version is: 8.0.21  
My Database type and version is: MySQL 8.0.30

**Your problem**  
My problem is: Log is flooded with PHP warnings.

These errors are showing in the log:

[2022-08-09 23:54:47] mautic.WARNING: PHP Warning - Trying to access array offset on value of type bool - in file /home/comkt/public\_html/mautic/app/bundles/PageBundle/Entity/HitRepository.php - at line 267 {“hostname”:“myserverhostname”,“pid”:3856296}

Steps I have tried to fix the problem:  
Searched help forums. Nothing seems relevant. The other issues related to this error message are for Mautic 3 and for different PHP files.

---

<div class="post-metadata">

**Author:** ![IonutOjicaDe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ionutojicade/32/7383_2.png) [@IonutOjicaDe](https://forum.mautic.org/u/IonutOjicaDe)\
**Post date:** [December 4, 2022, 3:21pm UTC](https://forum.mautic.org/t/error-trying-to-access-array-offset-on-value-of-type-bool-error-in-hitrepository-php/25007/2 "2022-12-04T15:21:40Z")

</div>

**Your software**  
My Mautic version is: 4.4.4  
My PHP version is: 7.4.29  
My Database type and version is: 10.3.37-MariaDB-0ubuntu0.20.04.1

I have the same problem. There is one line for each added contact, identified or not. Does any one knows, what is leading to this warning?

One complete warning-line is:  
`[2022-12-04 14:14:53] mautic.NOTICE: PHP Notice - Trying to access array offset on value of type bool - in file /var/www/html/m/app/bundles/PageBundle/Entity/HitRepository.php - at line 267 {"options":{"leadId":"1217","0":"https://ionutojica.com/%","second_to_last":"5346"},"sq":"[object] (Doctrine\\DBAL\\Query\\QueryBuilder: SELECT h.date_hit latest_hit FROM page_hits h WHERE (h.lead_id = 1217) AND (h.id <> 5346))","result":false} {"hostname":"ubuntu-2gb-nbg1","pid":2241445}`

Does anyone understand what the warning line say?

---

<div class="post-metadata">

**Author:** ![growthlab](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/growthlab/32/2029_2.png) [@growthlab](https://forum.mautic.org/u/growthlab)\
**Post date:** [January 18, 2024, 5:24pm UTC](https://forum.mautic.org/t/error-trying-to-access-array-offset-on-value-of-type-bool-error-in-hitrepository-php/25007/3 "2024-01-18T17:24:05Z")

</div>

Bumping this. Any ideas?
