mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-08 00:16:24 +00:00
draft must be default valued
This commit is contained in:
parent
87d6ecd1cc
commit
79f3b5ca24
@ -59,13 +59,15 @@ class SmsController extends Controller {
|
|||||||
|
|
||||||
foreach ($smsDatas as &$sms) {
|
foreach ($smsDatas as &$sms) {
|
||||||
if (!array_key_exists("id", $sms) || !array_key_exists("read", $sms) ||
|
if (!array_key_exists("id", $sms) || !array_key_exists("read", $sms) ||
|
||||||
!array_key_exists("draft", $sms) ||
|
|
||||||
!array_key_exists("date", $sms) || !array_key_exists("seen", $sms) ||
|
!array_key_exists("date", $sms) || !array_key_exists("seen", $sms) ||
|
||||||
!array_key_exists("body", $sms) || !array_key_exists("address", $sms)) {
|
!array_key_exists("body", $sms) || !array_key_exists("address", $sms)) {
|
||||||
$this->errorMsg = "Error: bad SMS entry";
|
$this->errorMsg = "Error: bad SMS entry";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!array_key_exists("draft", $sms)) {
|
||||||
|
$sms["draft"] = "true";
|
||||||
|
|
||||||
if (!is_numeric($sms["id"])) {
|
if (!is_numeric($sms["id"])) {
|
||||||
$this->errorMsg = "Error: Invalid SMS ID";
|
$this->errorMsg = "Error: Invalid SMS ID";
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user