Phalcon Framework 2.0.13

Application\Modules\Purchase\Exception: E_INVALID_ARGUMENT

/home/www/tesserus/application/modules/purchase/facade.php (284)
#0Application\Modules\Purchase\Facade->canPurchaseTickets(Array([trailer] => https://www.youtube.com/embed/kuEIhjdMtUM, [is_kiibox] => ))
/home/www/tesserus/application/view/schedules/show.phtml (128)
<div class="wrapper device-desktop">
    <div class="row _mt-2x">
        <div class="col-6">
            <div class="event-poster">
                <?php if ($schedule['poster']) { ?>
                    <?php if ($schedule['terms'][0]['slug'] == 'film') { ?>
                        <img src="<?php echo $schedule['poster']; ?>">
                    <?php } else { ?>
                        <img src="<?php echo $schedule['poster'] . '/large'; ?>">
                    <?php } ?>
                <?php } else { ?>
                    <img src="<?php echo $this->url->getStatic('img/no-poster-large.png'); ?>">
                <?php } ?>
            </div>
 
            <div class="content">
                <p class="_align-center">Поделиться в соц. сетях:</p>
 
                <p class="_align-center">
                    <?php
                    foreach ($shares as $share) {
                        echo $share;
                    }
                    ?>
                </p>
            </div>
        </div>
 
        <div class="col-12">
            <div class="content">
                <div class="event-title">
                    <?php
                    if ($schedule['is_kiibox']) {
                        $title = explode('/', $schedule['name']);
                        $title = $title[0];
                    } else {
                        $title = $this->escaper->escapeHtml($schedule['name']);
                    }
                    ?>
                    <?php echo $title; ?>
                </div>
 
                <?php if (!empty($schedule['terms'])) { ?>
                    <ul class="event-tag">
                        <?php foreach ($schedule['terms'] as $term) { ?>
                            <li class="event-tag-item">
                                <a href="<?php echo $this->url->get('term/' . $term['slug']) ?>">
                                    <?php echo $this->escaper->escapeHtml($term['name']); ?>
                                </a>
                            </li>
                        <?php } ?>
                    </ul>
                <?php } ?>
 
                <div class="content-body">
                    <?php echo $this->markdown->text($schedule['description']); ?>
                </div>
            </div>
 
            <?php
            if ($schedule['trailer'] != '') {
            ?>
            <iframe class="film-trailer" src="<?php echo $schedule['trailer']; ?>" frameborder="0" allowfullscreen></iframe>
            <?php
            }
            ?>
        </div>
 
        <div class="col-6">
            <div class="content">
                <?php
                if ($schedule['terms'][0]['slug'] != 'film') {
                ?>
                <a class="event-place" href="<?php echo $this->url->get('place/' . $schedule['place_id']) ?>">
                    <?php echo $schedule['place_name']; ?>
                </a>
 
                <div class="meta">
                    <div class="meta-row">
                        <div class="meta-key">Дата</div>
 
                        <div class="meta-value">
                            <?php echo $this->format->date($schedule['start_date'], 'j F Y'); ?>
                        </div>
                    </div>
 
                    <?php if ($schedule['terms'][0]['slug'] != 'film') { ?>
                    <div class="meta-row">
                        <div class="meta-key">Время</div>
 
                        <div class="meta-value">
                            <?php echo $this->format->date($schedule['start_date'], 'H:i'); ?>
                        </div>
                    </div>
                    <?php } ?>
 
                    <div class="meta-row">
                        <div class="meta-key">Цена</div>
 
                        <div class="meta-value">
                            <?php
                            $price = array_filter($schedule['price'], 'intval');
                            $min = min($price);
                            $max = max($price);
 
                            if ($min == $max) {
                                echo $min;
                            } else {
                                echo $min . '&thinsp;&mdash;&thinsp;' . $max;
                            }
                            ?>
                            <span class="mdi mdi-currency-rub"></span>
                        </div>
                    </div>
                </div>
                <?php
                    if ($schedule['is_kiibox']) {
                    ?>
                    <div class="_align-center">
                        <a class="button _primary _depth-1"
                           href="<?php echo $this->url->get('purchase/selectkiibox/'.$schedule['place_id']); ?>">
                            Купить билеты
                            <span class="mdi mdi-checkbox-marked-circle-outline"></span>
                        </a>
                    </div>
                    <?php
                    } else {
                        if ($this->purchase->canPurchaseTickets($schedule)) {
                    ?>
                    <div class="_align-center">
                        <a class="button _primary _depth-1"
                           href="<?php echo $this->url->get('purchase/selectseats/' . $schedule['id']); ?>">
                            Купить билеты
                            <span class="mdi mdi-checkbox-marked-circle-outline"></span>
                        </a>
                    </div>
                    <?php
                        }
                    }
                } else {
                ?>
                <div class="meta">
                    <?php
                    if ($schedule['year'] != '') {
                    ?>
                    <div class="meta-row">
                        <div class="meta-key">Год выпуска</div>
 
                        <div class="meta-value">
                            <?php echo $schedule['year']; ?>
                        </div>
                    </div>
                    <?php
                    }
 
                    if ($schedule['country'] != '') {
                    ?>
                    <div class="meta-row">
                        <div class="meta-key">Страна</div>
 
                        <div class="meta-value">
                            <?php echo $schedule['country']; ?>
                        </div>
                    </div>
                    <?php
                    }
 
                    if ($schedule['genre'] != '') {
                    ?>
                    <div class="meta-row">
                        <div class="meta-key">Жанр</div>
 
                        <div class="meta-value">
                            <?php echo $schedule['genre']; ?>
                        </div>
                    </div>
                    <?php
                    }
 
                    if ($schedule['director'] != '') {
                    ?>
                    <div class="meta-row">
                        <div class="meta-key">Режиссер</div>
 
                        <div class="meta-value">
                            <?php echo $schedule['director']; ?>
                        </div>
                    </div>
                    <?php
                    }
 
                    if ($schedule['cast'] != '') {
                    ?>
                    <div class="meta-row">
                        <div class="meta-key">Актеры</div>
 
                        <div class="meta-value">
                            <?php echo $schedule['cast']; ?>
                        </div>
                    </div>
                    <?php
                    }
                    ?>
                </div>
                <div class="_align-center">
                    <?php if (isset($_GET['second_id'])) { ?>
                    <a class="button _primary _depth-1"
                       href="<?php echo $this->url->get('purchase/selectschedule/' . $schedule['id'].'?date=').date('Y-m-d', strtotime($schedule['start_date'])).'&second_id='.$_GET['second_id']; ?>">
                        Купить билеты
                        <span class="mdi mdi-checkbox-marked-circle-outline"></span>
                    </a>
                    <?php } else { ?>
                    <a class="button _primary _depth-1"
                       href="<?php echo $this->url->get('purchase/selectschedule/' . $schedule['id'].'?date=').date('Y-m-d', strtotime($schedule['start_date'])); ?>">
                        Купить билеты
                        <span class="mdi mdi-checkbox-marked-circle-outline"></span>
                    </a>
                    <?php } ?>
                </div>
                <?php
                }
                ?>
            </div>
        </div>
    </div>
</div>
 
<div class="device-mobile">
    <div class="snap-drawers snap-drawer-left">
        <div class="mobile-left">
            <div class="helper"></div>
            <section style="margin-top: 0;">
                <div class="inside">
                    <?php
                    $current_url = strtok($this->request->getURI(), '?');
                    $current_url = rtrim($current_url, '/');
                    $current_url = $this->request->getServerName() . $current_url;
                    $current_url = $this->request->getScheme() . '://' . $current_url;
                    $items = $this->config->get('header', []);
                    ?>
                    <ul class="header-menu">
                        <?php
                        foreach ($items as $item) {
                            $url    = rtrim($this->url->get($item->url), '/');
                            $active = $url == $current_url ? '_active' : '';
                            ?>
                            <?php  ?>
                            <li class="header-menu-item <?php echo $active; ?>">
                                <a class="header-menu-item-link"
                                   href="<?php echo $url; ?>">
                                    <?php echo $item->name; ?>
                                </a>
                            </li>
                        <?php } ?>
                    </ul>
                </div>
            </section>
        </div>
    </div>
 
    <div class="snap-content" id="snap_content">
        <div class="helper"></div>
        <?php
        $banner_top_status = \Application\Models\Options::findFirst('option_key = "banner_top_status"')->toArray();
        $banner_top_url = \Application\Models\Options::findFirst('option_key = "banner_top_url"')->toArray();
        $banner_top_image = \Application\Models\Options::findFirst('option_key = "banner_top_image"')->toArray();
        $banner_top_target = \Application\Models\Options::findFirst('option_key = "banner_top_target"')->toArray();
 
        if ($banner_top_status['option_value'] == 'enabled') {
        ?>
        <a style="background-image:url(<?php echo $banner_top_image['option_value']; ?>)" target="<?php echo $banner_top_target['option_value'] ?>" class="accent top-banner" href="<?php echo $banner_top_url['option_value']; ?>">
        </a>
        <?php
        }
        ?>
        <div class="mobile-content">
            <div class="content">
                <div class="event-poster _mb">
                    <?php if ($schedule['poster']) { ?>
                        <?php if ($schedule['terms'][0]['slug'] == 'film') { ?>
                            <img src="<?php echo $schedule['poster']; ?>">
                        <?php } else { ?>
                            <img src="<?php echo $schedule['poster'] . '/large'; ?>">
                        <?php } ?>
                    <?php } else { ?>
                        <img src="<?php echo $this->url->getStatic('img/no-poster-large.png'); ?>">
                    <?php } ?>
                </div>
 
                <div class="content-title">
                    <?php
                    if ($schedule['is_kiibox']) {
                        $title = explode('/', $schedule['name']);
                        $title = $title[0];
                    } else {
                        $title = $this->escaper->escapeHtml($schedule['name']);
                    }
                    ?>
                    <?php echo $title; ?>
                </div>
 
                <?php if (!empty($schedule['terms'])) { ?>
                    <ul class="event-tag">
                        <?php foreach ($schedule['terms'] as $term) { ?>
                            <li class="event-tag-item">
                                <a href="<?php echo $this->url->get('term/' . $term['slug']) ?>">
                                    <?php echo $this->escaper->escapeHtml($term['name']); ?>
                                </a>
                            </li>
                        <?php } ?>
                    </ul>
                <?php } ?>
 
                <div class="content-body">
                    <?php echo $this->markdown->text($schedule['description']); ?>
                </div>
            </div>
 
            <?php
            if ($schedule['trailer'] != '') {
            ?>
            <iframe style="height: 200px;margin-bottom:15px" class="film-trailer" src="<?php echo $schedule['trailer']; ?>" frameborder="0" allowfullscreen></iframe>
            <?php
            }
            ?>
 
            <div class="content">
                <?php
                if ($schedule['terms'][0]['slug'] != 'film') {
                ?>
                <a class="event-place" href="<?php echo $this->url->get('place/' . $schedule['place_id']) ?>">
                    <?php echo $schedule['place_name']; ?>
                </a>
 
                <div class="meta">
                    <div class="meta-row">
                        <div class="meta-key">Дата</div>
 
                        <div class="meta-value">
                            <?php echo $this->format->date($schedule['start_date'], 'j F Y'); ?>
                        </div>
                    </div>
 
                    <?php if ($schedule['terms'][0]['slug'] != 'film') { ?>
                    <div class="meta-row">
                        <div class="meta-key">Время</div>
 
                        <div class="meta-value">
                            <?php echo $this->format->date($schedule['start_date'], 'H:i'); ?>
                        </div>
                    </div>
                    <?php } ?>
 
                    <div class="meta-row">
                        <div class="meta-key">Цена</div>
 
                        <div class="meta-value">
                            <?php
                            $price = array_filter($schedule['price'], 'intval');
                            $min = min($price);
                            $max = max($price);
 
                            if ($min == $max) {
                                echo $min;
                            } else {
                                echo $min . '&thinsp;&mdash;&thinsp;' . $max;
                            }
                            ?>
                            <span class="mdi mdi-currency-rub"></span>
                        </div>
                    </div>
                </div>
                <?php
                    if ($this->purchase->canPurchaseTickets($schedule)) {
                        if ($schedule['is_kiibox']) {
                        ?>
                        <div class="_align-center">
                            <a class="button _primary _depth-1"
                               href="<?php echo $this->url->get('purchase/selectkiibox/'.$schedule['place_id']); ?>">
                                Купить билеты
                                <span class="mdi mdi-checkbox-marked-circle-outline"></span>
                            </a>
                        </div>
                        <?php
                        } else {
                            if ($this->purchase->canPurchaseTickets($schedule)) {
                        ?>
                        <div class="_align-center">
                            <a class="button _primary _depth-1"
                               href="<?php echo $this->url->get('purchase/selectseats/' . $schedule['id']); ?>">
                                Купить билеты
                                <span class="mdi mdi-checkbox-marked-circle-outline"></span>
                            </a>
                        </div>
                        <?php
                            }
                        }
                    }
                } else {
                ?>
                <div class="meta">
                    <?php
                    if ($schedule['year'] != '') {
                    ?>
                    <div class="meta-row">
                        <div class="meta-key">Год выпуска</div>
 
                        <div class="meta-value">
                            <?php echo $schedule['year']; ?>
                        </div>
                    </div>
                    <?php
                    }
 
                    if ($schedule['country'] != '') {
                    ?>
                    <div class="meta-row">
                        <div class="meta-key">Страна</div>
 
                        <div class="meta-value">
                            <?php echo $schedule['country']; ?>
                        </div>
                    </div>
                    <?php
                    }
 
                    if ($schedule['genre'] != '') {
                    ?>
                    <div class="meta-row">
                        <div class="meta-key">Жанр</div>
 
                        <div class="meta-value">
                            <?php echo $schedule['genre']; ?>
                        </div>
                    </div>
                    <?php
                    }
 
                    if ($schedule['director'] != '') {
                    ?>
                    <div class="meta-row">
                        <div class="meta-key">Режиссер</div>
 
                        <div class="meta-value">
                            <?php echo $schedule['director']; ?>
                        </div>
                    </div>
                    <?php
                    }
 
                    if ($schedule['cast'] != '') {
                    ?>
                    <div class="meta-row">
                        <div class="meta-key">Актеры</div>
 
                        <div class="meta-value">
                            <?php echo $schedule['cast']; ?>
                        </div>
                    </div>
                    <?php
                    }
                    ?>
                </div>
                <div class="_align-center">
                    <?php if (isset($_GET['second_id'])) { ?>
                    <a class="button _primary _depth-1"
                       href="<?php echo $this->url->get('purchase/selectschedule/' . $schedule['id'].'?date=').date('Y-m-d', strtotime($schedule['start_date'])).'&second_id='.$_GET['second_id']; ?>">
                        Купить билеты
                        <span class="mdi mdi-checkbox-marked-circle-outline"></span>
                    </a>
                    <?php } else { ?>
                    <a class="button _primary _depth-1"
                       href="<?php echo $this->url->get('purchase/selectschedule/' . $schedule['id'].'?date=').date('Y-m-d', strtotime($schedule['start_date'])); ?>">
                        Купить билеты
                        <span class="mdi mdi-checkbox-marked-circle-outline"></span>
                    </a>
                    <?php } ?>
                </div>
                <?php
                }
                ?>
            </div>
 
            <div class="content">
                <p class="_align-center">Поделиться в соц. сетях:</p>
 
                <p class="_align-center show-social">
                    <?php
                    foreach ($shares as $share) {
                        echo $share;
                    }
                    ?>
                </p>
            </div>
 
            <div style="clear:both"></div>
        </div>
 
        <div class="mobile-footer">
            <div class="footer-first">
                <a class="footer-logo" href="/"></a>
 
                <span class="footer-payment"></span>
            </div>
 
            <div class="footer-copy">
                &copy; <?php echo date('Y'); ?> ИП Аммосов В. А. 311144831500036<br>
                <div class="social">
                    <span class="_mr social-title">Социальные сети</span>
 
                    <a class="button _facebook _square _small" href="https://facebook.com/tesserus/" target="_blank">
                        <span class="mdi mdi-facebook"></span>
                    </a>
 
                    <a class="button _vk _square _small" href="https://vk.com/tesserus" target="_blank">
                        <span class="mdi mdi-vk"></span>
                    </a>
 
                    <a class="button _instagram _square _small" href="https://instagram.com/tesserus" target="_blank">
                        <span class="mdi mdi-instagram"></span>
                    </a>
 
                    <a class="button _twitter _square _small" href="https://twitter.com/tesserus" target="_blank">
                        <span class="mdi mdi-twitter"></span>
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>
 
<script type="text/javascript">
    var snapper = new Snap({
        element: document.getElementById('snap_content'),
        disable: 'right'
    });
 
    $('#ol').on('click', function () {
        if ($(this).hasClass('active')) {
            snapper.close('left');
            $(this).removeClass('active');
        } else {
            snapper.open('left');
            $(this).addClass('active');
        }
 
    });
</script>
#1Phalcon\Mvc\View\Engine\Php->render(/home/www/tesserus/application/view/schedules/show.phtml, Array([title] => Tesserus.com - билеты на концерты, спектакли, выставки шоу и другое в г. Якутск, [schedule] => Array([trailer] => https://www.youtube.com/embed/kuEIhjdMtUM, [is_kiibox] => ), [shares] => Array([facebook] => <a href="https://www.facebook.com/sharer.php?u=https%3A%2F%2Ftesserus.com%2Fschedules%2Fshow%2Ffilm%2Fra_61716" class="button _facebook _square _small" target="_blank"><span class="mdi mdi-facebook"></span></a>, [vk] => <a href="https://vk.com/share.php?url=https%3A%2F%2Ftesserus.com%2Fschedules%2Fshow%2Ffilm%2Fra_61716" class="button _vk _square _small" target="_blank"><span class="mdi mdi-vk"></span></a>, [twitter] => <a href="https://twitter.com/home?status=https%3A%2F%2Ftesserus.com%2Fschedules%2Fshow%2Ffilm%2Fra_61716" class="button _twitter _square _small" target="_blank"><span class="mdi mdi-twitter"></span></a>), [opengraph] => <meta name="og:title" property="og:title"></meta>\n<meta name="og:description" property="og:description"></meta>\n<meta name="og:image" property="og:image" content="https://tesserus.com/img/logo-og.png"></meta>\n), true)
#2Phalcon\Mvc\View->_engineRender(Array([.phtml] => Object(Components\Mvc\View\Engine\Php)), schedules/show, true, true, null)
#3Phalcon\Mvc\View->render(schedules, show, Array([0] => film, [1] => ra_61716))
#4Phalcon\Mvc\Application->handle()
/home/www/tesserus/application/loader.php (13)
<?php
require_once 'boot/functions.php';
require_once 'boot/constants.php';
require_once 'boot/autoloader.php';
require_once 'boot/config.php';
require_once 'boot/di.php';
require_once 'boot/assets.php';
 
/**
 * Приложение.
 */
$application = new \Phalcon\Mvc\Application($di);
echo $application->handle()->getContent();
#5include(/home/www/tesserus/application/loader.php)
/home/www/tesserus/public/index.php (2)
<?php
include '../application/loader.php';
KeyValue
_url/schedules/show/film/ra_61716
date2017-04-25
KeyValue
USERwww-data
HOME/var/www
FCGI_ROLERESPONDER
QUERY_STRING_url=/schedules/show/film/ra_61716&date=2017-04-25
REQUEST_METHODGET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_FILENAME/home/www/tesserus/public/index.php
SCRIPT_NAME/index.php
REQUEST_URI/schedules/show/film/ra_61716?date=2017-04-25
DOCUMENT_URI/index.php
DOCUMENT_ROOT/home/www/tesserus/public
SERVER_PROTOCOLHTTP/1.0
GATEWAY_INTERFACECGI/1.1
SERVER_SOFTWAREnginx/1.4.6
REMOTE_ADDR54.167.211.58
REMOTE_PORT36042
SERVER_ADDR91.239.26.78
SERVER_PORT443
SERVER_NAMEtesserus.com
HTTPSon
REDIRECT_STATUS200
PATH_INFO
PATH_TRANSLATED/home/www/tesserus/public
HTTP_HOSTtesserus.com
HTTP_ACCEPT_ENCODINGx-gzip, gzip, deflate
HTTP_USER_AGENTCCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
PHP_SELF/index.php
REQUEST_TIME_FLOAT1498739778.7406
REQUEST_TIME1498739778
#Path
0/home/www/tesserus/public/index.php
1/home/www/tesserus/application/loader.php
2/home/www/tesserus/application/boot/functions.php
3/home/www/tesserus/application/boot/constants.php
4/home/www/tesserus/application/boot/autoloader.php
5/home/www/tesserus/components/loader.php
6/home/www/tesserus/application/boot/config.php
7/home/www/tesserus/components/config/adapter/json.php
8/home/www/tesserus/application/boot/di.php
9/home/www/tesserus/application/boot/di/shared.php
10/home/www/tesserus/components/uuid.php
11/home/www/tesserus/components/uuidinterface.php
12/home/www/tesserus/components/mvc/model/helper/crud.php
13/home/www/tesserus/components/message.php
14/home/www/tesserus/components/format.php
15/home/www/tesserus/application/plugin/option.php
16/home/www/tesserus/application/boot/di/mvc.php
17/home/www/tesserus/components/http/response.php
18/home/www/tesserus/components/assets/manager.php
19/home/www/tesserus/components/tag.php
20/home/www/tesserus/application/plugin/pagination.php
21/home/www/tesserus/application/boot/assets.php
22/home/www/tesserus/components/mvc/router.php
23/home/www/tesserus/components/mvc/view.php
24/home/www/tesserus/components/mvc/viewinterface.php
25/home/www/tesserus/application/view/module/banner.php
26/home/www/tesserus/components/mvc/view/moduleinterface.php
27/home/www/tesserus/application/view/module/calendar.php
28/home/www/tesserus/components/mvc/view/module.php
29/home/www/tesserus/application/dispatcher/plugin/frontend.php
30/home/www/tesserus/components/mvc/dispatcher.php
31/home/www/tesserus/application/controllers/schedulescontroller.php
32/home/www/tesserus/application/modules/extserv/strategy.php
33/home/www/tesserus/application/modules/extserv/adapterinterface.php
34/home/www/tesserus/application/modules/extserv/adapter/rambler.php
35/home/www/tesserus/application/modules/extserv/adapter.php
36/home/www/tesserus/application/modules/youtube/facade.php
37/home/www/tesserus/components/mvc/view/engine/php.php
38/home/www/tesserus/components/mvc/view/engineinterface.php
39/home/www/tesserus/application/view/schedules/show.phtml
40/home/www/tesserus/application/vendor/parsedown/Parsedown.php
41/home/www/tesserus/application/modules/purchase/facade.php
42/home/www/tesserus/application/modules/purchase/exception.php
43/home/www/tesserus/application/modules/exception.php
Memory
Usage1048576