An exception is thrown (and potentially caught by the try/catch block included in a previous patch) when wessage is too short for wordwrap to add the necessary newline character.

Comments

pdrake’s picture

StatusFileSize
new672 bytes

See attached for a method to prevent this by appending a newline character to the return of wordwrap.

jeffsheltren’s picture

StatusFileSize
new726 bytes

I also experienced this problem with the latest version of the module -- short_message isn't getting set for messages less than 100 characters in length. Here's an alternate patch which gets rid of wordwrap completely. This patch is sponsored by WebWise Solutions and Symantec.

msonnabaum’s picture

Status: Active » Fixed

#2 looks good to me.

Committed.

jeffsheltren’s picture

Status: Fixed » Needs review
StatusFileSize
new898 bytes

I noticed that when the original message is shorter than 100 characters that my patch was chopping off the last word of it to create the short message. Here's an updated patch which only does the preg_replace if the substr function is called and will directly assign the short message if the message is shorter than 100 characters.

jeffsheltren’s picture

Status: Needs review » Closed (fixed)

Committed the updated patch from #4.