forked from devsam/core
fix: ?? 연산자 우선순위
This commit is contained in:
@@ -41,7 +41,7 @@ $penaltyInfo = array_merge($memberPenalty['any'] ?? [], $memberPenalty[DB::prefi
|
|||||||
|
|
||||||
$penalty = [];
|
$penalty = [];
|
||||||
foreach($penaltyInfo as $penaltyKey => $penaltyValue){
|
foreach($penaltyInfo as $penaltyKey => $penaltyValue){
|
||||||
if($penaltyValue['expire'] ?? 0 > TimeUtil::now()){
|
if(($penaltyValue['expire'] ?? 0) > TimeUtil::now()){
|
||||||
$penalty[$penaltyKey] = $penaltyValue['value'];
|
$penalty[$penaltyKey] = $penaltyValue['value'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ $penaltyInfo = array_merge($memberPenalty['any'] ?? [], $memberPenalty[DB::prefi
|
|||||||
|
|
||||||
$penalty = [];
|
$penalty = [];
|
||||||
foreach ($penaltyInfo as $penaltyKey => $penaltyValue) {
|
foreach ($penaltyInfo as $penaltyKey => $penaltyValue) {
|
||||||
if ($penaltyValue['expire'] ?? 0 > TimeUtil::now()) {
|
if (($penaltyValue['expire'] ?? 0) > TimeUtil::now()) {
|
||||||
$penalty[$penaltyKey] = $penaltyValue['value'];
|
$penalty[$penaltyKey] = $penaltyValue['value'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ class Join extends \sammo\BaseAPI
|
|||||||
|
|
||||||
$penalty = [];
|
$penalty = [];
|
||||||
foreach($penaltyInfo as $penaltyKey => $penaltyValue){
|
foreach($penaltyInfo as $penaltyKey => $penaltyValue){
|
||||||
if($penaltyValue['expire'] ?? 0 > TimeUtil::now()){
|
if(($penaltyValue['expire'] ?? 0) > TimeUtil::now()){
|
||||||
$penalty[$penaltyKey] = $penaltyValue['value'];
|
$penalty[$penaltyKey] = $penaltyValue['value'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ class che_초토화 extends Command\NationCommand{
|
|||||||
$aux = $this->nation['aux'];
|
$aux = $this->nation['aux'];
|
||||||
|
|
||||||
if($destCity['level'] >= 8){
|
if($destCity['level'] >= 8){
|
||||||
$aux[NationAuxKey::did_특성초토화->value] = $aux[NationAuxKey::did_특성초토화->value] ?? 0 + 1;
|
$aux[NationAuxKey::did_특성초토화->value] = ($aux[NationAuxKey::did_특성초토화->value] ?? 0) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class AllowJoinDestNation extends Constraint{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($this->general['npc']??2 < 2) && \str_starts_with($this->destNation['name'], 'ⓤ')){
|
if((($this->general['npc']??2) < 2) && \str_starts_with($this->destNation['name'], 'ⓤ')){
|
||||||
$this->reason = "유저장은 태수국에 임관할 수 없습니다.";
|
$this->reason = "유저장은 태수국에 임관할 수 없습니다.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -510,7 +510,7 @@ async function reloadCommandList() {
|
|||||||
const turnTime = parseTime(result.turnTime);
|
const turnTime = parseTime(result.turnTime);
|
||||||
let nextTurnTime = new Date(turnTime);
|
let nextTurnTime = new Date(turnTime);
|
||||||
|
|
||||||
const autorunLimitYearMonth = result.autorun_limit ?? yearMonth - 1;
|
const autorunLimitYearMonth = (result.autorun_limit ?? yearMonth) - 1;
|
||||||
const [autorunLimitYear, autorunLimitMonth] = parseYearMonth(autorunLimitYearMonth);
|
const [autorunLimitYear, autorunLimitMonth] = parseYearMonth(autorunLimitYearMonth);
|
||||||
|
|
||||||
reservedCommandList.value = [];
|
reservedCommandList.value = [];
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ function updateCommandList() {
|
|||||||
const turnTime = parseTime(props.turnTime);
|
const turnTime = parseTime(props.turnTime);
|
||||||
let nextTurnTime = new Date(turnTime);
|
let nextTurnTime = new Date(turnTime);
|
||||||
|
|
||||||
const autorunLimitYearMonth = autorun_limit.value ?? yearMonth - 1;
|
const autorunLimitYearMonth = (autorun_limit.value ?? yearMonth) - 1;
|
||||||
const [autorunLimitYear, autorunLimitMonth] = parseYearMonth(autorunLimitYearMonth);
|
const [autorunLimitYear, autorunLimitMonth] = parseYearMonth(autorunLimitYearMonth);
|
||||||
|
|
||||||
for (const obj of props.turn) {
|
for (const obj of props.turn) {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ if($userInfo['delete_after']){
|
|||||||
|
|
||||||
$penaltyList = Json::decode($userInfo['penalty']??'{}');
|
$penaltyList = Json::decode($userInfo['penalty']??'{}');
|
||||||
foreach($penaltyList as $penaltyKey=>$penaltyValue){
|
foreach($penaltyList as $penaltyKey=>$penaltyValue){
|
||||||
if($penaltyValue['expire'] ?? 0 > TimeUtil::now()){
|
if(($penaltyValue['expire'] ?? 0) > TimeUtil::now()){
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result'=>false,
|
||||||
'reason'=>"징계가 남아있어 탈퇴할 수 없습니다."
|
'reason'=>"징계가 남아있어 탈퇴할 수 없습니다."
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ $userInfo = $RootDB->queryFirstRow(
|
|||||||
if (!$userInfo) {
|
if (!$userInfo) {
|
||||||
if(!$oauthID){
|
if(!$oauthID){
|
||||||
$me = $restAPI->meWithEmail();
|
$me = $restAPI->meWithEmail();
|
||||||
if ($me['code']??0 < 0) {
|
if (($me['code']??0) < 0) {
|
||||||
Json::die([
|
Json::die([
|
||||||
'result' => false,
|
'result' => false,
|
||||||
'reqOTP' => false,
|
'reqOTP' => false,
|
||||||
|
|||||||
Reference in New Issue
Block a user