Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix warning `sprintf(): Too few arguments` (JMail) #1829

Merged
merged 1 commit into from

3 participants

@piotr-cz

Arguments are assigned to RuntimeException constructor instead of sprintf

<br />
<b>Warning</b>:  sprintf() [<a href='function.sprintf'>function.sprintf</a>]: Too few arguments in <b>*\libraries\joomla\mail\mail.php</b> on line <b>99</b><br />
<br />
<b>Fatal error</b>:  Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]]) in <b>*\libraries\joomla\mail\mail.php</b> on line <b>99</b><br />
@mbabker mbabker merged commit b8294d0 into joomla:staging
@mbabker
Owner

It's wrong to merge my own PR, but if someone issues one with the exact same fix... :wink:

Thanks!

@dongilbert
Collaborator

Nice workaround there @mbabker :+1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 15, 2013
  1. @piotr-cz
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 libraries/joomla/mail/mail.php
View
4 libraries/joomla/mail/mail.php
@@ -82,7 +82,7 @@ public function Send()
}
else
{
- throw new RuntimeException(sprintf('%s::Send mail not enabled.'), get_class($this));
+ throw new RuntimeException(sprintf('%s::Send mail not enabled.', get_class($this)));
}
}
@@ -96,7 +96,7 @@ public function Send()
}
else
{
- throw new RuntimeException(sprintf('%s::Send failed: "%s".'), get_class($this), $this->ErrorInfo);
+ throw new RuntimeException(sprintf('%s::Send failed: "%s".', get_class($this), $this->ErrorInfo));
}
}
Something went wrong with that request. Please try again.