Ecshop 7 error due to high PHP version

Source: Internet
Author: User
Tags auth deprecated explode parse error php class

Ecshop compatible PHP version is low, incompatible PHP version, if the use of other versions may be a variety of errors, such as the following seven error problems:
1. Strict Standards:non-static Method Cls_image::gd_version () should is not called statically
Static statics not declared
return Cls_image::gd_version ();
Replaced by
$p = new Cls_image ();
return $p->gd_version ();
2, Strict standards:only variables should is passed by reference
Variables should be passed by reference
Will $tag_sel = Array_shift (Explode (', $tag));
Replaced by
$tag _arr = Explode (", $tag);
$tag _sel = Array_shift ($tag _arr);
3, Deprecated:preg_replace (): the/e modifier is deprecated, use preg_replace_callback instead
will return Preg_replace ("/{([^\}\{\n]*)}/e", "\ $this->sel ect (' \\1 ');", $source);
Replaced by
Return Preg_replace_callback ("/{([^\}\{\n]*)}/", function ($r) {return $this->sel ect ($r [1]);}, $source);
4, Strict standards:redefining already defined constructor for class PayPal

   PHP class, there are two constructors, one is a function with the same name as the class, one is ____construct (). Starting with PHP5.4, the most rigorous definition of the order in which the two functions appear must be ____construct () before the function with the same name is
For example:
function __construct ()
     {
        $this->paypal ();
   }
   
    function paypal ()
    {
   }
5, Mktime (): You sh The Ould is using the time () function instead
Mktime () method is invoked without parameters
to $auth = Mktime ();
Replace with
$auth = time ();
6, S Trict standards:declaration of Vbb::set_cookie () should is compatible with Integrate::set_cookie ($username = ', $remembe r = NULL)
The function of a subclass has the same name as the parent class, and the function arguments of the subclass must be the same as the number of corresponding function parameters of the parent class
based on the error, modify for example:
function Set_cookie ($username = "")
to
function Set_cookie ($username = "", $remember = NULL)
7, Parse error:syntax error, unexpected ';
syntax error, missing; or echo has no output value

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.