Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update z_RFC822.php #4

Merged
merged 1 commit into from
Feb 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/include/z_RFC822.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function parseAddressList($address = null, $default_domain = null, $nest_

if (isset($address)) $this->address = $address;
// z-push addition
if (strlen(trim($this->address)) == 0) return array();
if (strlen(trim((string) $this->address)) == 0) return array();
if (isset($default_domain)) $this->default_domain = $default_domain;
if (isset($nest_groups)) $this->nestGroups = $nest_groups;
if (isset($validate)) $this->validate = $validate;
Expand Down Expand Up @@ -244,7 +244,7 @@ protected function _splitAddresses($address)
}

// Split the string based on the above ten or so lines.
$parts = explode($split_char, $address);
$parts = explode($split_char, (string) $address);
$string = $this->_splitCheck($parts, $split_char);

// If a group...
Expand Down Expand Up @@ -276,7 +276,7 @@ protected function _splitAddresses($address)

// Remove the now stored address from the initial line, the +1
// is to account for the explode character.
$address = trim(substr($address, strlen($string) + 1));
$address = trim(substr((string) $address, strlen($string) + 1));

// If the next char is a comma and this was a group, then
// there are more addresses, otherwise, if there are any more
Expand Down Expand Up @@ -305,7 +305,7 @@ protected function _splitAddresses($address)
protected function _isGroup($address)
{
// First comma not in quotes, angles or escaped:
$parts = explode(',', $address);
$parts = explode(',', (string) $address);
$string = $this->_splitCheck($parts, ',');

// Now we have the first address, we can reliably check for a
Expand Down