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

Сайт не грузит


Recommended Posts

Кто-то знает как это исправить?

"При загрузке страницы скрипт /silvers.in.ua/www/system/storage/modification/system/engine/event.php пытается выполнятся более 30 секунд, после чего убивается сервером как зависший"

Link to post
Share on other sites

Ну покажите содержимое файла

Link to post
Share on other sites

<?php
/*
* Event System Userguide
*
* https://github.com/opencart/opencart/wiki/Events-(script-notifications)-2.2.x.x
*/
class Event {
    protected $registry;
    protected $data = array();

    public function __construct($registry) {
        $this->registry = $registry;
    }

    public function register($trigger, Action $action) {
        $this->data[$trigger][] = $action;
    }

    public function trigger($event, array $args = array()) {

                if( in_array( $event, array( 'model/module/mega_filter/before', 'model/module/mega_filter/after' ) ) ) {
                    return;
                }

        foreach ($this->data as $trigger => $actions) {
            if (preg_match('/^' . str_replace(array('\*', '\?'), array('.*', '.'), preg_quote($trigger, '/')) . '/', $event)) {
                foreach ($actions as $action) {
                    $result = $action->execute($this->registry, $args);

                    if (!is_null($result) && !($result instanceof Exception)) {
                        return $result;
                    }
                }
            }
        }
    }

    public function unregister($trigger, $route = '') {
        if ($route) {
            foreach ($this->data[$trigger] as $key => $action) {
                if ($action->getId() == $route) {
                    unset($this->data[$trigger][$key]);
                }
            }
        } else {
            unset($this->data[$trigger]);
        }
    }

    public function removeAction($trigger, $route) {
        foreach ($this->data[$trigger] as $key => $action) {
            if ($action->getId() == $route) {
                unset($this->data[$trigger][$key]);
            }
        }
    }
}

Link to post
Share on other sites

Много, да, товаров?

Link to post
Share on other sites

2 часа назад, Vishnveiys сказал:

Нет код самого "ивента"

Цитата

/silvers

 

Link to post
Share on other sites

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.