From 6f186125e371ef80688ec47373cf1c32e22620c4 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 24 Mar 2018 12:38:03 +0900 Subject: [PATCH] NULL -> null --- d_setting/conf.orig.php | 4 ++-- f_func/func.php | 2 +- twe/d_setting/conf.orig.php | 4 ++-- twe/func.php | 2 +- twe/func_message.php | 8 ++++---- twe/func_template.php | 2 +- twe/j_msgsubmit.php | 2 +- twe/lib.php | 2 +- twe/templates/msg_plate.php | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/d_setting/conf.orig.php b/d_setting/conf.orig.php index c61c1481..5d659499 100644 --- a/d_setting/conf.orig.php +++ b/d_setting/conf.orig.php @@ -33,9 +33,9 @@ function getRootDB(){ $port = _tK_port_; $encoding = 'utf8'; - static $uDB = NULL; + static $uDB = null; - if($uDB === NULL){ + if($uDB === null){ $uDB = new MeekroDB($host,$user,$password,$dbName,$port,$encoding); $uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true; } diff --git a/f_func/func.php b/f_func/func.php index a96f4568..f7f1b4b6 100644 --- a/f_func/func.php +++ b/f_func/func.php @@ -186,7 +186,7 @@ function toInt($val, $force=false){ if(is_numeric($val)){ return intval($val);// } - if($val === 'NULL' || $val === 'null'){ + if(strtolower($val) === 'null'){ return null; } diff --git a/twe/d_setting/conf.orig.php b/twe/d_setting/conf.orig.php index c99d16a6..fd3c41c9 100644 --- a/twe/d_setting/conf.orig.php +++ b/twe/d_setting/conf.orig.php @@ -14,9 +14,9 @@ function getDB(){ $port = _tK_port_; $encoding = 'utf8'; - static $uDB = NULL; + static $uDB = null; - if($uDB === NULL){ + if($uDB === null){ $uDB = new MeekroDB($host,$user,$password,$dbName,$port,$encoding); $uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true; } diff --git a/twe/func.php b/twe/func.php index 495a1dce..f0131273 100644 --- a/twe/func.php +++ b/twe/func.php @@ -1343,7 +1343,7 @@ function pushHistory($history) { function getRawLog($path, $count, $line_length, $skin){ //TODO: tail과 유사한 형태로 처리할 수 있는게 나을 듯. 그 이전에 파일 로그는 좀... ㅜㅜ if(!file_exists($path)){ - return NULL; + return null; } $fp = fopen($path, 'r'); diff --git a/twe/func_message.php b/twe/func_message.php index c91ae6c9..ab309f77 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -54,11 +54,11 @@ function getSingleMessage($messageID){ return [true, $messageInfo]; } -function getRawMessage($mailbox, $msgType, $limit=30, $fromSeq=NULL){ +function getRawMessage($mailbox, $msgType, $limit=30, $fromSeq=null){ $sql = 'select * from `message` where `mailbox` = %i_mailbox and `type` = %s_type and `valid_until` > now()'; - if($fromSeq !== NULL){ + if($fromSeq !== null){ $sql .= ' and `id` > %i_id'; } $sql .= ' ORDER BY `id` desc'; @@ -80,9 +80,9 @@ function getRawMessage($mailbox, $msgType, $limit=30, $fromSeq=NULL){ }, $result); } -function getMessage($msgType, $nationID=null, $limit=30, $fromSeq=NULL){ +function getMessage($msgType, $nationID=null, $limit=30, $fromSeq=null){ $generalID = getGeneralID(false); - if($generalID === NULL){ + if($generalID === null){ return []; } diff --git a/twe/func_template.php b/twe/func_template.php index 57d31a08..227cc967 100644 --- a/twe/func_template.php +++ b/twe/func_template.php @@ -89,7 +89,7 @@ function commandButton() { $generalID = getGeneralID(); - if($generalID === NULL){ + if($generalID === null){ return ''; } $db = getDB(); diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index fda0ea48..8e21f741 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -132,7 +132,7 @@ if($destMailbox == 9999) { $destUser = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `no` = %s',$destMailbox); - if($destUser == NULL || empty($destUser)){ + if($destUser == null || empty($destUser)){ returnJson([ 'result' => false, 'reason' => '존재하지 않는 유저입니다.', diff --git a/twe/lib.php b/twe/lib.php index 8fb209a2..39742312 100644 --- a/twe/lib.php +++ b/twe/lib.php @@ -230,7 +230,7 @@ function toInt($val, $force=false){ if(is_numeric($val)){ return intval($val);// } - if($val === 'NULL' || $val === 'null'){ + if($val === 'null' || $val === 'null'){ return null; } diff --git a/twe/templates/msg_plate.php b/twe/templates/msg_plate.php index 74311650..48e4df2f 100644 --- a/twe/templates/msg_plate.php +++ b/twe/templates/msg_plate.php @@ -21,7 +21,7 @@ > - +