Skip to content

Commit

Permalink
解决了Passing null to parameter #1 ($string) of type string is deprecate…
Browse files Browse the repository at this point in the history
…d报错的问题;
  • Loading branch information
rainbowsoft committed Feb 13, 2025
1 parent a601ca2 commit 7ddeaf7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions zb_system/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
$mods = &$GLOBALS['api_public_mods'];
$mods_allow = &$GLOBALS['api_allow_mods_rule']; //格式为 array( array('模块名'=>'方法名') )
$mods_disallow = &$GLOBALS['api_disallow_mods_rule']; //如果是 array( array('模块名'=>'') )方法名为空将匹配整个模块
$mod = strtolower(GetVars('mod', 'GET'));
$act = strtolower(GetVars('act', 'GET'));
$mod = strtolower(GetVars('mod', 'GET', ''));
$act = strtolower(GetVars('act', 'GET', ''));

// 载入系统和应用的 mod
ApiLoadMods();
Expand Down
2 changes: 1 addition & 1 deletion zb_system/cmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
Redirect_cmd_end('admin/index.php?act=admin');
}
if (empty($zbp->user->ID) && GetVars('redirect', 'GET')) {
setcookie("redirect", GetVars('redirect', 'GET'), 0, $zbp->cookiespath);
setcookie("redirect", GetVars('redirect', 'GET', ''), 0, $zbp->cookiespath);
}
Redirect_cmd_end('login.php');
break;
Expand Down
2 changes: 1 addition & 1 deletion zb_system/function/c_system_common.php
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ function GetEnvironment($more = false)
GetValueInArray(
explode(
' ',
str_replace(array('Microsoft-', '/'), array('', ''), GetVars('SERVER_SOFTWARE', 'SERVER'))
str_replace(array('Microsoft-', '/'), array('', ''), GetVars('SERVER_SOFTWARE', 'SERVER', ''))
),
0
) . '; PHP' . GetPHPVersion() . (IS_X64 ? 'x64' : '') . '; ';
Expand Down
4 changes: 2 additions & 2 deletions zb_system/function/c_system_event.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function Redirect_to_search()
function Redirect_cmd_to_search($post_type = 0)
{
global $zbp, $action;
//$q = rawurlencode(trim(strip_tags(GetVars('q', 'POST'))));
//$q = rawurlencode(trim(strip_tags(GetVars('q', 'POST', ''))));
//Redirect302($zbp->searchurl . '?q=' . $q);

$route = $zbp->GetPostType_Sub($post_type, 'routes', 'post_article_search');
Expand All @@ -134,7 +134,7 @@ function Redirect_cmd_to_search($post_type = 0)
$r = new UrlRule($urlrule);
}

$q = rawurlencode(trim(strip_tags(GetVars('q', 'POST'))));
$q = rawurlencode(trim(strip_tags(GetVars('q', 'POST', ''))));
$r->Rules['{%page%}'] = '';
$r->Rules['{%q%}'] = $q;
$r->Rules['{%search%}'] = $q;
Expand Down
4 changes: 2 additions & 2 deletions zb_system/function/c_system_misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function misc_vrs()
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
if (strpos(GetVars('HTTP_USER_AGENT', 'SERVER'), 'Trident/')) {
if (strpos(GetVars('HTTP_USER_AGENT', 'SERVER', ''), 'Trident/')) {
?>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<?php
Expand Down Expand Up @@ -281,7 +281,7 @@ function misc_php_zbp_info()
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
if (strpos(GetVars('HTTP_USER_AGENT', 'SERVER'), 'Trident/')) {
if (strpos(GetVars('HTTP_USER_AGENT', 'SERVER', ''), 'Trident/')) {
?>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<?php
Expand Down
2 changes: 1 addition & 1 deletion zb_system/function/lib/zblogphp.php
Original file line number Diff line number Diff line change
Expand Up @@ -4866,7 +4866,7 @@ public function CheckSiteClosed()
public function RedirectInstall()
{
if (!$this->option['ZC_DATABASE_TYPE']) {
$s = GetVars('QUERY_STRING', 'GET');
$s = GetVars('QUERY_STRING', 'GET', '');
$s = empty($s) ? '' : '?' . $s;
if (is_readable(ZBP_PATH . 'zb_install/index.php')) {
Redirect302('./zb_install/index.php' . $s);
Expand Down

0 comments on commit 7ddeaf7

Please sign in to comment.