Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into feature/view-layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public function getSubject()
*/
public function setBody($body)
{
if (!is_string($body) && !is_null($body)) {
if (!is_string($body) && $body !== null) {
if (!is_object($body)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects a string or object argument; received "%s"',
Expand Down
2 changes: 1 addition & 1 deletion src/Transport/Sendmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function __construct($parameters = null)
*/
public function setParameters($parameters)
{
if (is_null($parameters) || is_string($parameters)) {
if ($parameters === null || is_string($parameters)) {
$this->parameters = $parameters;
return $this;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Transport/SmtpOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function getName()
*/
public function setName($name)
{
if (!is_string($name) && !is_null($name)) {
if (!is_string($name) && $name !== null) {
throw new Exception\InvalidArgumentException(sprintf(
'Name must be a string or null; argument of type "%s" provided',
(is_object($name) ? get_class($name) : gettype($name))
Expand Down Expand Up @@ -111,7 +111,7 @@ public function getConnectionClass()
*/
public function setConnectionClass($connectionClass)
{
if (!is_string($connectionClass) && !is_null($connectionClass)) {
if (!is_string($connectionClass) && $connectionClass !== null) {
throw new Exception\InvalidArgumentException(sprintf(
'Connection class must be a string or null; argument of type "%s" provided',
(is_object($connectionClass) ? get_class($connectionClass) : gettype($connectionClass))
Expand Down

0 comments on commit 8344c40

Please sign in to comment.