Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Решено] Ошибка в OpenCart Version 2.2.0.0 (rs.1) при переходе с php 5.6 на 7.2


Recommended Posts

Привет. Перевёл сайт c php 5.6 на 7.2, появилась ошибка:

PHP Notice:  Undefined variable: expire in ../system/library/template.php on line 9

template.php:

<?php
class Template {
	private $adaptor;

  	public function __construct($adaptor) {
	    $class = 'Template\\' . $adaptor;

		if (class_exists($class)) {
			$this->adaptor = new $class($expire);
		} else {
			throw new \Exception('Error: Could not load template adaptor ' . $adaptor . '!');
		}
	}

	public function set($key, $value) {
		$this->adaptor->set($key, $value);
	}

	public function render($template) {
		return $this->adaptor->render($template);
	}
}

Было у кого такое? На форуме не нашёл..

OpenCart Version 2.2.0.0 (rs.1)

Link to comment
Share on other sites


Замените

$this->adaptor = new $class($expire);

на

$this->adaptor = new $class();

 

  • +1 1
Link to comment
Share on other sites

  • 5 months later...
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.