PHP Notice: Undefined offset: in /var/www/html/mailscanner/functions.php on line 2533

Bugs in eFa 4
Post Reply
victorburgos
Posts: 19
Joined: 13 May 2017 20:53

PHP Notice: Undefined offset: in /var/www/html/mailscanner/functions.php on line 2533

Post by victorburgos »

Hi, I was checking my /var/log/php-fpm/www-error.log file and found thousands of notices with this text:

Code: Select all

[18-Dec-2020 02:38:08 Europe/Madrid] PHP Notice:  Undefined offset: 0 in /var/www/html/mailscanner/functions.php on line 2533
[18-Dec-2020 02:38:08 Europe/Madrid] PHP Notice:  Undefined offset: 2 in /var/www/html/mailscanner/functions.php on line 2533
[18-Dec-2020 02:38:08 Europe/Madrid] PHP Notice:  Undefined offset: 4 in /var/www/html/mailscanner/functions.php on line 2533
[18-Dec-2020 02:38:08 Europe/Madrid] PHP Notice:  Undefined offset: 6 in /var/www/html/mailscanner/functions.php on line 2533
[18-Dec-2020 02:38:08 Europe/Madrid] PHP Notice:  Undefined offset: 7 in /var/www/html/mailscanner/functions.php on line 2533
[18-Dec-2020 02:38:08 Europe/Madrid] PHP Notice:  Undefined offset: 15 in /var/www/html/mailscanner/functions.php on line 2533
[18-Dec-2020 02:38:08 Europe/Madrid] PHP Notice:  Undefined offset: 23 in /var/www/html/mailscanner/functions.php on line 2533
I counted how many times this line is on my log file and found it 552255 times.

Code: Select all

grep "on line 2533" /var/log/php-fpm/www-error.log|wc -l
552255
I was able to find that this lines showed up every time I refreshed my mailwatch RECENT MESSAGES section, one line for every message.

Checking the line referenced (2533) on the notice, I found this code

Code: Select all

   2532                     $tooltipAddon = '';
   2533                     if ($tooltips[$f]) {
   2534                         $tooltipAddon = ' title="' . $tooltips[$f] . '"';
   2535                     }
I would like to fix this issue, is this a bug?
How should I proceed? (comment those lines?)
Thanks for your help.
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: PHP Notice: Undefined offset: in /var/www/html/mailscanner/functions.php on line 2533

Post by shawniverson »

Code: Select all

$tooltipAddon = '';
                    if (isset($tooltips[$f]) && $tooltips[$f] !== false) {
                        $tooltipAddon = ' title="' . $tooltips[$f] . '"';
                    }
Post Reply