Error: Cannot use object of type LayoutMiddleware as array
Ticket Number:
"iNlg__-aPrNnwnQGWdkY-npJTMCLwWl_t8_RwizPKjE"
—
Email this ticket
Class: Error
in file: /home/mcwane2/htdocs/admin/includes/autoload.php
on line: 382
Cannot use object of type LayoutMiddleware as array
-
- $outlay = Outlay::instance();
- return $outlay['title'];
- } else {
- global $app;
- if (isset($app->layout) && isset($app->layout['title'])) {
- return $app->layout['title'];
- }
- }
-
- return null;
- alt(void) at file: /home/mcwane2/htdocs/admin/blocks/image/view.php on line: 77
- <figure>
- <img class="b-lazy scale"
- src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="
- data-src="<?php echo h($block[$photo[$block['image_type']]]); ?>"
- alt="<?php echo h(alt($block['image_alt'], $block['image_media_caption'])) ?>"
- />
- </figure>
- <?php if (isset($block['image_media_caption']) && !empty($block['image_media_caption'])) { ?>
- <figcaption><?php echo h($block['image_media_caption']); ?></figcaption>
- <?php } ?>
- include("/home/mcwane2/h") at file: /home/mcwane2/htdocs/classes/blocktype.class.php on line: 33
- }
-
- public function render($__file, $vars=array()) {
- extract($vars);
- include $__file;
- }
-
- public function view($block, $data=array()) {
- if (!is_array($data)) {
- $data = array();
- BlockType->render(void) at file: /home/mcwane2/htdocs/classes/blocktype.class.php on line: 48
- $is_preview = isset($data['id']) && ($outlay instanceof Outlay) && $outlay['_preview'] == true;
- if ($is_preview) {
- echo "<div id=\"{$data['id']}\" class=\"module admin-preview-module\">";
- }
- $this->render($this->dir . '/view.php', $data);
- if ($is_preview) {
- echo "</div>";
- }
- }
-
- BlockType->view(void) at file: /home/mcwane2/htdocs/admin/includes/autoload.php on line: 355
- $b->view($block, array('outlay' => $outlay));
- $in_container = false;
- }
- } else {
- $b->view($block, array('outlay' => $outlay, 'id' => $id));
- }
- }
-
- if ($in_container) {
- // check for any missing end container at the end of the loop
- viewBlocks(void) at file: /home/mcwane2/htdocs/includes/shared/responsive/news/news-articles/article.php on line: 25
- </nav>
- <?php } ?>
- <?php if ($row['use_content_blocks'] == 1) { ?>
- <?php viewBlocks('mcwa_article_posts', $row['id']); ?>
- <?php } else { ?>
- <?php if ($fire) { ?>
- <div class="editor-content">
- <?php } ?>
- include("/home/mcwane2/h") at file: /app/pages.php on line: 27
- if(isset($options['body_class'])) {
- $app->layout->data['body_class'] = $options['body_class'];
- }
-
- include $_SERVER['DOCUMENT_ROOT'] . $file;
- }
-
- function useLayout($app, $options=array()) {
- include $_SERVER['DOCUMENT_ROOT'] . '/app/config/titles.php';
-
- ViewPage(void) at file: /app/app.php on line: 108
-
- public function dispatch($route) {
- $callable = (count($route) == 0 || !is_callable($route[0])) ? $this->default_handler : $route[0];
- $route[0] = $this->app;
- call_user_func_array($callable, $route);
- }
-
- public function call() {
- if(isset($this->static_routes[$this->app->url])) {
- $this->dispatch($this->static_routes[$this->app->url]);
- AppDispatchMiddleware->dispatch(void) at file: /app/app.php on line: 125
- $this->app->params[$p] = urldecode($matches[$p]);
- }
- }
- try {
- $this->dispatch($route);
- return;
- } catch(RouteNotFoundException $e) {
- continue;
- }
- }
- AppDispatchMiddleware->call(void) at file: /app/app.php on line: 150
-
- public function call() {
- ob_start();
-
- $this->next->call();
-
- if($this->name != '') {
- $this->data['content'] = ob_get_clean();
- $this->app->render($this->dir . '/' . $this->name . '.php', $this->data);
- } else {
- LayoutMiddleware->call(void) at file: /app/app.php on line: 30
- $this->url = $url;
- }
-
- $this->addMiddleware($this->router);
- $this->middleware[0]->call();
- }
-
- public function addMiddleware(IAppMiddleware $middleware) {
- $this->middleware[] = $middleware;
- $middleware->app = $this;
- App->dispatch(void) at file: /index.php on line: 86
- $app->layout = new LayoutMiddleware($_SERVER['DOCUMENT_ROOT'] . '/app/layout');
- $app->layout->name = 'front';
- $app->addMiddleware($app->layout);
-
- $app->dispatch();
Request
- Request URI
- /communications/news-articles/content-block-test/
- Request HOST
- amerex-defense.tmg04.com
- Request Method
- GET
- Request Date/Time
- 03/26/2023 14:03:57
- HTTPS
- No
- User-Agent
- CCBot/2.0 (https://commoncrawl.org/faq/)
- Accept
- text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Language
- en-US,en;q=0.5
- If-Modified-Since
- Thu, 30 Jun 2022 08:20:35 GMT
- Accept-Encoding
- br,gzip
- Host
- amerex-defense.tmg04.com
- Connection
- Keep-Alive
Remote
- Remote Address
- 3.238.250.73
- Remote Port
- 52296
- Remote Host
- ec2-3-238-250-73.compute-1.amazonaws.com
PHP Info
- PHP Version
- 7.4.3-4ubuntu2.18
- System
- Linux trilix-vmweb06 5.4.0-144-generic #161-Ubuntu SMP Fri Feb 3 14:49:04 UTC 2023 x86_64
- Peak Memory Usage
- 1.01 MB (1057384 bytes)
- Include Path
- .:/home/amerex-defense/htdocs/:.:/usr/share/php
- Magic Quotes
Deprecated: Function get_magic_quotes_runtime() is deprecated in /home/mcwane2/htdocs/classes/errors.class.php on line 490
No
- Included Files
- /index.php
/admin/includes/autoload.php
/home/mcwane2/htdocs/admin/includes/autoload.php
/home/mcwane2/htdocs/classes/errors.class.php
/home/mcwane2/htdocs/admin/includes/settings.php
/app/app.php
/app/pages.php
/home/mcwane2/htdocs/includes/shared/responsive/routes/corporate-responsibility.php
/app/config/titles.php
/home/mcwane2/htdocs/includes/shared/responsive/news/news-articles/article.php
/home/mcwane2/htdocs/includes/shared/fetch/news/news-articles/article.php
/home/mcwane2/htdocs/classes/db.class.php
/home/mcwane2/htdocs/classes/querybuilder.class.php
/home/mcwane2/htdocs/classes/utils.class.php
/home/mcwane2/htdocs/classes/outlay.class.php
/home/mcwane2/htdocs/classes/cache.class.php
/home/mcwane2/htdocs/classes/blocktype.class.php
/home/mcwane2/htdocs/admin/blocks/text/proc.php
/home/mcwane2/htdocs/admin/blocks/text/view.php
/home/mcwane2/htdocs/admin/blocks/image/proc.php
/home/mcwane2/htdocs/admin/blocks/image/view.php
- Streams wrappers
- https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
- Streams filters
- zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*
- Extensions
- apache2handler, bz2, calendar, Core, ctype, curl, date, dom, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, PDFlib, PDO, pdo_mysql, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, soap, sockets, sodium, SPL, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib
Simple Backtrace
#0 /home/mcwane2/htdocs/admin/blocks/image/view.php 77 alt
#1 /home/mcwane2/htdocs/classes/blocktype.class.php 33 include(string(48): "/home/mcwane...")
#2 /home/mcwane2/htdocs/classes/blocktype.class.php 48 BlockType->render
#3 /home/mcwane2/htdocs/admin/includes/autoload.php 355 BlockType->view
#4 /home/mcwane2/htdocs/includes/shared/responsive/news/news-articles/article.php 25 viewBlocks
#5 /home/amerex-defense/htdocs/app/pages.php 27 include(string(78): "/home/mcwane...")
#6 /home/amerex-defense/htdocs/app/app.php 108 ViewPage
#7 /home/amerex-defense/htdocs/app/app.php 125 AppDispatchMiddleware->dispatch
#8 /home/amerex-defense/htdocs/app/app.php 150 AppDispatchMiddleware->call
#9 /home/amerex-defense/htdocs/app/app.php 30 LayoutMiddleware->call
#10 /home/amerex-defense/htdocs/index.php 86 App->dispatch