Strict Standards: Non-static method cls_image::gd_

后台提示:Strict Standards: Non-static method cls_image::gd_version() should not be called statically in E:\web\wgegou\includes\lib_base.php on line 346

保存原因:

PHP版本是5.4,PHP5.3以上默认只能传递具体的变量,而不能通过函数返回值传递。

总结原由:由于PHP版本引起的问题。。

 

具体解决方案:

 

includes/cls_template.php on line 406”的解决方案。
将 $tag_sel = array_shift(explode(‘ ‘, $tag)); 这句话拆开为两句。
$tag_arr = explode(‘ ‘, $tag);
$tag_sel = array_shift($tag_arr);


array_shift() 的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值 end(&array) 也一样(后面也会有end的函数,也需要拆分为两行)。

 

includes/lib_base.php on line 346”的解决方案。
在346行里面,发现gd_version()方法未声明静态static,所以会出错:

return cls_image::gd_version();

改成:

$p = new cls_image();
return $p->gd_version();


 

后台点击 开店向导 警告的解决方案。
admin/include/modules/payment 下的几个文件构造函数错误,删掉即可。

 

 

StrictStandards:Non-staticmethodcls_image::gd_version()shouldnotbecalledstaticallyin\install\includes\lib_installer.phponline31

  解决:找到install/includes/lib_installer.php中的第31行returncls_image::gd_version();

然后在找到include/cls_image.php中的678行,发现gd_version()方法未声明静态static,所以会出错。这时候只要将functiongd_version()改成staticfunctiongd_version()即可。

 

 

Strictstandards:Onlyvariablesshouldbepassedbyreferencein\includes\lib_main.phponline1329

$ext=end(explode('.',$tmp));

修改为:

$ext=explode('.',$tmp);
$ext=end($ext);

 

Strictstandards:Onlyvariablesshouldbepassedbyreferencein\includes\cls_template.phponline418

tag_sel=array_shift(explode('',$tag));

修改为:

$tag_arr=explode('',$tag);$tag_sel=array_shift($tag_arr);

 
 

 

安装的时候出现错误

Non-static method cls_image::gd_version() should not be called statically in includes\lib_installer.php on line 31

进入install/include目录打开文件 找到31行

return cls_image::gd_version();

修改成

$p = new cls_image();

return $p->gd_version();

 

还有根目录的include目录下的lib_base.php的346行也是一样修改

 
 
 
安装完登录后台提示错误:

Only variables should be passed by reference includes\cls_template.php on line 406

 

打开includes\cls_template.php 找到406行

$tag_sel = array_shift(explode(' ', $tag));改成:$tag_arr = explode(' ', $tag); $tag_sel = array_shift($tag_arr);

出现Redefining already defined constructor for class alipay 错误

把构造函数__construct移到同名函数前面

如:include/cls_captcha.php



function __construct($folder = '', $width = 145, $height = 20)

{

$this->captcha($folder, $width, $height);

}

 

移到

function captcha($folder = '', $width = 145, $height = 20)

前面

需要注意的是后台支付方式里的大多数都要做这个修改

 

 

打开前台页出现错误:

Only variables should be passed by referenceincludes\lib_main.php on line 1329

$ext=end(explode('.',$tmp));

修改为:

$ext=explode('.',$tmp);$ext=end($ext);

 

 

打开后台出现错误:

XmlHttpRequest status:[500] Unknow status

找到/admin/templates/top.htm

然后删除下面的代码:

<script type="text/javascript">

onload = function()

{

Ajax.call('index.php?is_ajax=1&act=license','', start_sendmail_Response, 'GET', 'JSON');

}

/**

* 帮助系统调用

*/

function web_address()

{

var ne_add = parent.document.getElementById('main-frame');

var ne_list = ne_add.contentWindow.document.getElementById('search_id').innerHTML;

ne_list.replace('-', '');

var arr = ne_list.split('-');

window.open('help.php?al='+arr[arr.length - 1],'_blank');

}

 

 

/**

* 授权检测回调处理

*/

function start_sendmail_Response(result)

{

// 运行正常

if (result.error == 0)

{

var str = '';

if (result['content']['auth_str'])

{

str = '<a href="javascript:void(0);" target="_blank">' + result['content']['auth_str'];

if (result['content']['auth_type'])

{

str += '[' + result['content']['auth_type'] + ']';

}

str += '</a> ';

}

 

document.getElementById('license-div').innerHTML = str;

}

}

 

function modalDialog(url, name, width, height)

{

if (width == undefined)

{

width = 400;

}

if (height == undefined)

{

height = 300;

}

 

if (window.showModalDialog)

{

window.showModalDialog(url, name, 'dialogWidth=' + (width) + 'px; dialogHeight=' + (height+5) + 'px; status=off');

}

else

{

x = (window.screen.width - width) / 2;

y = (window.screen.height - height) / 2;

 

window.open(url, name, 'height='+height+', width='+width+', left='+x+', top='+y+', toolbar=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, modal=yes');

}

}

 

function ShowToDoList()

{

try

{

var mainFrame = window.top.frames['main-frame'];

mainFrame.window.showTodoList(adminId);

}

catch (ex)

{

}

}

{/literal}

 

var adminId = "{$admin_id}";

</script>

 

 

找到/admin/templates/menu.htm

419行删除

Ajax.call('cloud.php?is_ajax=1&act=menu_api','', start_menu_api, 'GET', 'JSON');

找到/admin/templates/start.htm

9行删除

Ajax.call('cloud.php?is_ajax=1&act=cloud_remind','', cloud_api, 'GET', 'JSON');

24行删除

Ajax.call('cloud.php?is_ajax=1&act=close_remind&remind_id='+id,'', cloud_api, 'GET', 'JSON');

 
 

后台商店设置功能出现错误

You should be using the time() function instead in admin\sms_url.php on line 31

admin\shop_config.php on line 32

mktime()修改为 time()

 

 

商品批量上传功能出现错误

Assigning the return value of new by reference is deprecated in admin\goods_batch.php on line 921

 

$filter = &new stdclass;

改成

$filter = new stdclass;

 

 

会员整合出现错误

phpbb::set_cookie() should be compatible with integrate

\includes\modules\integrates\phpbb.php on line 232

110行

function set_cookie ($username="")

修改成

function set_cookie ($username="", $remember = NULL)

 

phpwind6.php ucenter.php vbb.php也是这样修改

 

ucenter.php 210行修改成

function add_user($username, $password, $email, $gender = -1, $bday = 0, $reg_date = 0, $md5password = '')

127行修改成

function login($username, $password, $remember = NULL)

 

数据库备份出现错误:

edefining already defined constructor for class cls_sql_dump

\admin\includes\cls_sql_dump.php on line 90

 

function __construct(&$db, $max_size =0)

{

$this->cls_sql_dump($db, $max_size);

}

移到function cls_sql_dump(&$db, $max_size=0)前面

 

Non-static method cls_sql_dump::get_random_name()admin\database.php on line 64

打开includes\cls_sql_dump.php

479行

function get_random_name()

修改成

static function get_random_name()




文章来自: 本站原创
引用通告地址: http://blog.wgidc.cn/trackback.asp?tbID=272
Tags:
评论: 0 | 引用: 0 | 查看次数: 2027
发表评论
昵 称:
密 码: 游客发言不需要密码.
验证码:
内 容:
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭