M
M
Mark2018-02-08 17:50:55
opencart
Mark, 2018-02-08 17:50:55

How to fix Call to a member function getImage() on a non-object in error?

Fatal error: Call to a member function getImage() on a non-object in /site.ru/system/library/image.php on line 145
Please tell me how to fix this error on OpenCart 2?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mark, 2018-02-08
@Mark54

stupidity, commented out these last 2 lines and everything worked fine

S
Stanislav B, 2018-02-08
@S_Borchev

where the Image::watermark
method is called with incorrect parameters. Judging by the code, it expects an instance of the same Image class as the first argument $watermark, and something else is passed there.
apparently you have version 2.1.0+
and in version 2.0 this method took the path to the file, apparently. This is probably what caused the problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question