Skip to content

Commit

Permalink
Fix accessing array offset on null in Header.php - closes #4488
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Jan 17, 2025
1 parent ac43d46 commit 9e1b53d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion overrides/webklex/php-imap/src/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ protected function parse() {
public function rfc822_parse_headers($raw_headers) {
$headers = [];
$imap_headers = [];
if (extension_loaded('imap') && $this->config["rfc822"]) {
if (extension_loaded('imap') && isset($this->config) && $this->config["rfc822"]) {
$raw_imap_headers = (array)\imap_rfc822_parse_headers($raw_headers);
foreach ($raw_imap_headers as $key => $values) {
$key = str_replace("-", "_", $key);
Expand Down

0 comments on commit 9e1b53d

Please sign in to comment.