Skip to content

Commit 4ddacc4

Browse files
committed
Apply fixes from StyleCI
1 parent 3c39386 commit 4ddacc4

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

lib/db.cls.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function connect($host = DH, $dbuser = DU, $password = DP, $dbname = DB,
3535
{
3636
$dbcode = str_replace('-', '', $dbcode);
3737
if (!$this->linkid) {
38-
$this->linkid = mysql_connect($host, $dbuser, $password) or die('Mysql数据库连接失败,请检查数据库用户名和密码是否正确!');
38+
$this->linkid = mysql_connect($host, $dbuser, $password) or exit('Mysql数据库连接失败,请检查数据库用户名和密码是否正确!');
3939
}
4040
$version = $this->getVersion();
4141

@@ -45,7 +45,7 @@ public function connect($host = DH, $dbuser = DU, $password = DP, $dbname = DB,
4545
mysql_query("SET sql_mode=''", $this->linkid);
4646
}
4747
} else {
48-
die('Mysql版本过低,请更换5.0以上版本!');
48+
exit('Mysql版本过低,请更换5.0以上版本!');
4949
}
5050
mysql_select_db($dbname, $this->linkid);
5151
}

lib/include/alipay.func.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function charsetEncode($input, $_output_charset, $_input_charset)
172172
} elseif (function_exists('iconv')) {
173173
$output = iconv($_input_charset, $_output_charset, $input);
174174
} else {
175-
die('sorry, you have no libs support for charset change.');
175+
exit('sorry, you have no libs support for charset change.');
176176
}
177177

178178
return $output;
@@ -198,7 +198,7 @@ function charsetDecode($input, $_input_charset, $_output_charset)
198198
} elseif (function_exists('iconv')) {
199199
$output = iconv($_input_charset, $_output_charset, $input);
200200
} else {
201-
die('sorry, you have no libs support for charset changes.');
201+
exit('sorry, you have no libs support for charset changes.');
202202
}
203203

204204
return $output;

lib/include/phpqrcode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ public function convertData()
16361636
$this->setVersion($ver);
16371637
}
16381638

1639-
for (; ;) {
1639+
for (;;) {
16401640
$bits = $this->createBitStream();
16411641

16421642
if ($bits < 0) {

lib/init.cls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function run()
142142
$run = new action($this);
143143
$run->display();
144144
} else {
145-
die('error:Unknown app to load, the app is '.$app);
145+
exit('error:Unknown app to load, the app is '.$app);
146146
}
147147
}
148148

lib/tpl.cls.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function readTpl($file)
6767
return $this->fl->readFile($file);
6868
}
6969

70-
die('The template not fount which name is '.$file);
70+
exit('The template not fount which name is '.$file);
7171
}
7272

7373
//判断字符值是否存在,并返回指定类型的值
@@ -500,7 +500,7 @@ public function readTpl($file)
500500
return $this->fl->readFile($file);
501501
}
502502

503-
die('The template not fount which name is '.$file);
503+
exit('The template not fount which name is '.$file);
504504
}
505505

506506
//判断字符值是否存在,并返回指定类型的值

lib/wechat.cls.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@ public function valid($return = false)
112112
}
113113
if ($echoStr) {
114114
if ($this->checkSignature()) {
115-
die($echoStr);
115+
exit($echoStr);
116116
}
117117

118-
die('no access');
118+
exit('no access');
119119
}
120120
if ($this->checkSignature()) {
121121
return true;
122122
}
123123

124-
die('no access');
124+
exit('no access');
125125

126126
return false;
127127
}

0 commit comments

Comments
 (0)