News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Error message on frontend

Started by Cyber Beginner, February 15, 2019, 09:16:26 AM

Previous topic - Next topic

Cyber Beginner

Hi,

I'm using Windows 8.1, Joomla! 3.9.2, VirtueMart 3.4.2, PHP Version 7.2.10, XAMPP - installed on local host.

On the frontend, in product view, I get the following error message:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; NewImg2Thumb has a deprecated constructor in C:\xampp\htdocs\bestbox\plugins\vmcustom\imagezoomer\helpers\img2thumb.php on line 22

Do you have any idea what do I need to do for solving this issue?

Thanks in advance for any help!

Denis

Jörgen

Contact imagezoomer, this extension is not PHP 7 ready, deprecated in php 5 (warning) and removed in php 7 (error)

If you know some php look at this, adapt names for the names used in line 22.

class yourClass
{
   // rename yourClass($myparam) to this:   
   public function __construct($myparam)
    {
        // Code from your old yourClass constructor is of course here
    }

   // Leaving this old style constructor is only for backwards compatibility, you can skip this
    public function yourClass($myparam)
    {
        // Only call the renamed constructor for backward compatibility
       self::__construct($myparam);
    }
}


This code is backwards compatible.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Cyber Beginner

Hi Jörgen,

thanks for your response.
Unfortunately, I don't know php, but I deactivated Imagezoomer and so the error message is disappeared.
I'll contact Imagezoome for a solution to this issue.

Have a nice day
Denis

Studio 42

You can simply edit the file C:\xampp\htdocs\bestbox\plugins\vmcustom\imagezoomer\helpers\img2thumb.php
and change  line 22
public function NewImg2Thumb
to
public function __construct
and save the file

Cyber Beginner

Thanks for your help!
It works!
Awesome!

Denis