Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > Project Tools > osTicket Bug Tracker > Bug

Issue Type Bug   Project osTicket Bug Tracker
sprintf error in class.email.php
parameter count wrong - so error never displays
Category Unknown
Affected Version 1.6 Stable
Priority Unknown
Status Fixed
Fixed Version (none)
Submitted 03-06-2010
Assigned Users (none) Tags (none)

issueid=188 03-06-2010 01:49 PM
Junior Member
sprintf error in class.email.php
parameter count wrong - so error never displays

I was having some trouble getting osticket working with our mail system...

It turns out the errors were never output:

--- /var/www/default/htdocs/include/class.email.php~
+++ /var/www/default/htdocs/include/class.email.php
@@ -194,7 +194,7 @@
if(!PEAR::isError($result))
return true;

- $alert=sprintf("Unable to email via %s:%d [%s]\n\n%s",$smtp['host'],$smtp['port'],$smtp['username']);
+ $alert=sprintf("Unable to email via %s:%d [%s]\n\n",$smtp['host'],$smtp['port'],$smtp['username']);
Sys::log(LOG_ALERT,'SMTP Error',$alert,false);
//print_r($result);
}
Reply

03-06-2010 01:51 PM
Junior Member
 
Just a thought, but as sprintf seems to be used for error output it might be worth double checking to see if this occurs anywhere else?

btw. Thanks for the excellent project and readable code - it's great - I should have implemented years ago.
Reply
03-06-2010 04:55 PM
Developer
 
The issue is fixed on the latest version - please upgrade.
Reply
03-08-2010 12:02 PM
Junior Member
 
Thanks for the response Peter! Am I misunderstanding the latest version though? I was using the Feb 1.6 stable release - does that download itself change? Or is there an SVN / snapshot I should be downloading / following updates to?
Thanks again!
Reply
03-08-2010 12:08 PM
Developer
 
Mitch,

I'm not sure when you downloaded the code but the latest version has the following -
Quote:
$alert=sprintf("Unable to email via %s:%d [%s]\n\n%s\n", $smtp['host'],$smtp['port'],$smtp['username'],$result->getMessage());
Sys::log(LOG_ALERT,'SMTP Error',$alert,false);
Simply diff the latest release with your install to see any other changes - I could have updated the the latest version.
Reply

Issue Tools
Subscribe to this issue

All times are GMT -4. The time now is 08:26 AM.