Bug 288954 - mail/roundcube-automatic_addressbook: silence warnings
Summary: mail/roundcube-automatic_addressbook: silence warnings
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-19 11:42 UTC by Oleg Streejak
Modified: 2025-11-14 02:17 UTC (History)
2 users (show)

See Also:
andrej: maintainer-feedback+


Attachments
patch to hush the warnings (1.43 KB, patch)
2025-08-19 11:42 UTC, Oleg Streejak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Streejak 2025-08-19 11:42:21 UTC
Created attachment 263071 [details]
patch to hush the warnings

Hello. I saw lot of errors in me log file due to trying to check of uninitialised/non-existed vars:

[31-Jul-2025 20:16:50 Europe/Moscow] PHP Warning:  Undefined array key "charset" in /usr/local/www/roundcube/plugins/automatic_addressbook/automatic_addressbook.php on line 132
[31-Jul-2025 20:16:50 Europe/Moscow] PHP Warning:  Undefined array key "Cc" in /usr/local/www/roundcube/plugins/automatic_addressbook/automatic_addressbook.php on line 133
[31-Jul-2025 20:16:50 Europe/Moscow] PHP Warning:  Undefined array key "charset" in /usr/local/www/roundcube/plugins/automatic_addressbook/automatic_addressbook.php on line 133
[31-Jul-2025 20:16:50 Europe/Moscow] PHP Warning:  Undefined array key "Bcc" in /usr/local/www/roundcube/plugins/automatic_addressbook/automatic_addressbook.php on line 134
[31-Jul-2025 20:16:50 Europe/Moscow] PHP Warning:  Undefined array key "charset" in /usr/local/www/roundcube/plugins/automatic_addressbook/automatic_addressbook.php on line 134
[31-Jul-2025 20:16:50 Europe/Moscow] PHP Warning:  Undefined array key "email:home" in /usr/local/www/roundcube/plugins/automatic_addressbook/automatic_addressbook.php on line 287
[31-Jul-2025 20:16:50 Europe/Moscow] PHP Warning:  Undefined array key "email:work" in /usr/local/www/roundcube/plugins/automatic_addressbook/automatic_addressbook.php on line 287

and so I propose the attched patch to hush this kind of warnings. Tested on my servers, it seems to works as expected

WBR
Comment 1 Andrej Ebert 2025-11-06 11:35:43 UTC
Looks good to me, but can't commit it.
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-11-14 02:07:21 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e69db495a51fb59f89b36bfcfc5c6e0124bbab85

commit e69db495a51fb59f89b36bfcfc5c6e0124bbab85
Author:     Oleg Streejak <oleg@pcbtech.ru>
AuthorDate: 2025-11-14 02:05:25 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-11-14 02:05:25 +0000

    mail/roundcube-automatic_addressbook: Silence warnings

    PR:             288954
    Approved by:    Andrej Ebert <andrej@ebert.su>

 mail/roundcube-automatic_addressbook/Makefile      |  3 ++-
 .../files/patch-automatic__addressbook.php (new)   | 24 ++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2025-11-14 02:17:17 UTC
Thanks.

Next time please create patch against ports tree. You can use my commit as example.