换成php7.4修复警告

This commit is contained in:
2026-02-24 13:51:28 +08:00
parent ab4066dd14
commit dc2b20ab8c
4 changed files with 11 additions and 10 deletions

View File

@@ -73,7 +73,7 @@ class Config_File {
*
* @param string $config_path (optional) path to the config files
*/
function Config_File($config_path = NULL)
function __construct($config_path = NULL)
{
if (isset($config_path))
$this->set_path($config_path);

View File

@@ -566,7 +566,7 @@ class Smarty
/**
* The class constructor.
*/
function Smarty()
function __construct()
{
$this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
: @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
@@ -1954,11 +1954,11 @@ class Smarty
function MakeHtmlFile($file_name, $c)
{
if(!$fp = fopen($file_name, "wa")){
echo "文件打开失败!";
echo "<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>";
return false;
}
if(!fwrite($fp, $c)){
echo "文件写入失败!";
echo "<EFBFBD>ļ<EFBFBD>д<EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>";
fclose($fp);
return false;
}

View File

@@ -78,7 +78,7 @@ class Smarty_Compiler extends Smarty {
/**
* The class constructor.
*/
function Smarty_Compiler()
function __construct()
{
// matches double quoted strings:
// "foobar"