Footer > 30 bug willl not Send SMS - Resolution

  1. When try send sms using compose message, and entered footer message 30 or more characters, SMS seems being queued but no SMS sent .

  2. Notice in the playsms.log, the footer cause the error due to extra space inserted before the footer which makes it more than 30 characters although it has been sanitized in the beginning including the trim. e.g extra space at beginning of footer - footer is already 30 chars

    • 2022-03-11 15:49:31 PID622aff0b8d7b3 - L2 sendsms_process # fail to save in db table smslog_id:40 db_query:[INSERT INTO playsms_tblSMSOutgoing (smslog_id,uid,parent_uid,p_gpid,p_gateway,p_smsc,p_src,p_dst,p_footer,p_msg,p_datetime,p_status,p_sms_type,unicode,queue_code) VALUES (‘40’,‘1’,‘0’,‘0’,‘nexmo’,‘sms144user’,‘sms144’,’+9999999999’,’ XYZ Chief Information 123(CIO)’,’Good evening test footer check’,‘2022-03-11 07:49:31’,‘0’,‘text’,‘0’,‘9f46062b6f88f433f111bb6ae5e66861’)]
  1. Resolution
    add trim function in line 501 of …/html/plugin/core/sendsms/fn.php
    // message entering this proc already stripslashed, we need to addslashes it before saving to db

$sms_sender = addslashes($sms_sender);

$sms_msg = addslashes($sms_msg);

$sms_footer = addslashes(trim($sms_footer));

Hope this help others having same issue.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.