mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 07:56:23 +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) {
|
||||
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("body", $sms) || !array_key_exists("address", $sms)) {
|
||||
$this->errorMsg = "Error: bad SMS entry";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!array_key_exists("draft", $sms)) {
|
||||
$sms["draft"] = "true";
|
||||
|
||||
if (!is_numeric($sms["id"])) {
|
||||
$this->errorMsg = "Error: Invalid SMS ID";
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user