mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #1274] Showing incomming mail fails if no contact modul is configurated #613
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#613
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MatthiasDomroes on GitHub (Oct 7, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1274
Originally assigned to: @Bienvenumoringa on GitHub.
🐛 Bugreport
Version & Environment
2.4.0
Rev: [] /nOS: []
PHP 8.1 / Apache / Windows
Steps to reproduce
Using
CYPHT_MODULES="core,imap,smtp,account,idle_timer,profiles,imap_folders,pgp_mine"
within .env
Navigate to show an incomming Mail.
[07-Oct-2024 18:15:15 Africa/Abidjan] PHP Fatal error: Uncaught Error: Call to a member function get() on null in C:\IDE\cypht\modules\imap\output_modules.php:233
Stack trace:
#0 C:\IDE\cypht\lib\module.php(555): Hm_Output_filter_message_headers->output()
...
Caused by
$contact = ($this->get('contact_store'))->get(null, false, $contact_email);
$contact_exists = !empty($contact);
Better working code:
$contact_store = $this->get('contact_store');
$contact = !$contact_store ? null : $contact_store->get(null, false, $contact_email);
$contact_exists = !empty($contact);
Maybe other coding also fails - but not tested systematicly.