Log flooded with mautic.NOTICE: PHP Notice - Trying to access array offset on value of type bool - Redlining Server

Your software
My Mautic version is: 3.3.3
My PHP version is: 7.4
My Database type and version is: 10.3.20-MariaDB-cll-lve

Your problem
My problem is:
Updated to 3.3.3 and then resolved all outstanding items in the logs. 1 day later the log is flooded with the error below and webserver swamped to redline.

mautic.NOTICE: PHP Notice - Trying to access array offset on value of type bool - in file /mautic/plugins/MauticFocusBundle/Include/lessc.inc.php - at line 719 {“args”:,“orderedValues”:,“keywordValues”:,“assignedValues”:,“i”:0,“last”:false}

Steps I have tried to fix the problem:
Searched the support forums and web for this error with nothing found.

3 Likes

got the same error log too. I’m on mautic v 3.3.4

Hi, I looked over the code of the plugin it looks like we are dealing with an empty array of some arguments. Can you post configuration of your focus item in Mautic and open up issue on github?

So we can reproduce this. The thing is fix for this seemss really simple (we actually just need to fix one condition in the code) but I am not sure at this point whether the issue described in the initial post is actually due to improper configuration in Mautic or is it actually a bug.

I don’t know which focus item generates this error.

then, I checked on of my focus item and I think I misconfigured a focus item

On the “what should the focus be” I selected “collect data” and on the Content there isn’t any form selected.

I then changed the focus to emphasize a link

I got the same error in V4.0.2 all my focus items are collecting data and all of them have forms inside.

we just upgraded a problematic instance to 4.1.0 following my investigation in this post.
And now I see the same message coming up all the time

2021/12/19 14:05:11 [error] 1075139#1075139: *100 FastCGI sent in stderr: "PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in
 /var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in 
/var/www/mautic/plugins/MauticFocusBundle/Include/lessc.inc.php on line 719PHP message: PHP 
Notice:  Trying to access array offset on value of type bool in /var/www/mautic/plu

We have focus types of both Link and Form, all seem to be generating this code error.

What else would you like me to produce in order to be able to debug - codfix ?

I will take a look at it and let you know if I need anything else. For now I think I have enough, thanks.

1 Like

much appreciated. I am also on the slack channel if you need any assistance.

Hi,

I made a small fix in lessphp lib inside Mautic core to get ride of the notice, you can see what I have changed here: < Improve condition in lessphp lib · mzagmajster/mautic@5ec12f1 · GitHub >.

Since this is not really issue of Mautic but rather the lessphp library Mautic uses, it would make sense to apply this fix to lessphp project (referenced in commit message above).

The thing is that original repository looks abandoned so I am not really sure what will be the strategy here.

I think the best thing here would be to fork or find the newer fork of original repository and commit the fix there, then release new version and use that one.

Maybe someone from Mautic Core team can give an advice how to get this fix to Mautic future release? @rcheesley

Regards, M.

2 Likes