Update Controller: More empty strings where NULLs should be

这个提交包含在:
Michael Cullen 2019-05-17 01:59:56 +01:00
父节点 f17690ad4c
当前提交 af3f405d7f

查看文件

@ -34,8 +34,8 @@ class Update extends CI_Controller {
$startinfo = strtotime($record->start); $startinfo = strtotime($record->start);
$endinfo = strtotime($record->end); $endinfo = strtotime($record->end);
$start_date = ($startinfo) ? date('Y-m-d H:i:s',$startinfo) : ""; $start_date = ($startinfo) ? date('Y-m-d H:i:s',$startinfo) : null;
$end_date = ($endinfo) ? date('Y-m-d H:i:s',$endinfo) : ""; $end_date = ($endinfo) ? date('Y-m-d H:i:s',$endinfo) : null;
if(!$entity->cqz) { if(!$entity->cqz) {
$data = array( $data = array(
@ -47,6 +47,7 @@ class Update extends CI_Controller {
'adif' => (int) $entity->adif, 'adif' => (int) $entity->adif,
'name' => (string) $entity->name, 'name' => (string) $entity->name,
'prefix' => (string) $entity->prefix, 'prefix' => (string) $entity->prefix,
'ituz' => (float) $entity->ituz,
'cqz' => (int) $entity->cqz, 'cqz' => (int) $entity->cqz,
'cont' => (string) $entity->cont, 'cont' => (string) $entity->cont,
'long' => (float) $entity->long, 'long' => (float) $entity->long,
@ -80,8 +81,8 @@ class Update extends CI_Controller {
$startinfo = strtotime($record->start); $startinfo = strtotime($record->start);
$endinfo = strtotime($record->end); $endinfo = strtotime($record->end);
$start_date = ($startinfo) ? date('Y-m-d H:i:s',$startinfo) : ""; $start_date = ($startinfo) ? date('Y-m-d H:i:s',$startinfo) : null;
$end_date = ($endinfo) ? date('Y-m-d H:i:s',$endinfo) : ""; $end_date = ($endinfo) ? date('Y-m-d H:i:s',$endinfo) : null;
$data = array( $data = array(
'record' => (int) $record->attributes()->record, 'record' => (int) $record->attributes()->record,
@ -120,8 +121,8 @@ class Update extends CI_Controller {
$startinfo = strtotime($record->start); $startinfo = strtotime($record->start);
$endinfo = strtotime($record->end); $endinfo = strtotime($record->end);
$start_date = ($startinfo) ? date('Y-m-d H:i:s',$startinfo) : ""; $start_date = ($startinfo) ? date('Y-m-d H:i:s',$startinfo) : null;
$end_date = ($endinfo) ? date('Y-m-d H:i:s',$endinfo) : ""; $end_date = ($endinfo) ? date('Y-m-d H:i:s',$endinfo) : null;
$data = array( $data = array(
'record' => (int) $record->attributes()->record, 'record' => (int) $record->attributes()->record,