You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eli alla oleva koodi oli väärin ja pitää olla siis näin (eli onko teidän koodissa vika kun, $args = $this->get_args(); muuttuja luo Objektin eikä Arraytä?):
`<?php
/**
Template Name: Archive
This template needs a page to function!
*/
/**
Class Archive
*/
class PageArchive extends MiddleModel {
`Minulla on PHP 7.2 ja Ubuntu 18.04 LTS, joten voisiko tähä virhe ilmoitus johtua liian uudesta PHP:sta?
[10-Nov-2020 07:39:16 UTC] PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /var/www/event/wp-content/themes/eventgeniem/models/page-archive.php:32
Stack trace:
#0 [internal function]: PageArchive->Query()
#1 /var/www/event/vendor/devgeniem/dustpress/classes/model.php(644): call_user_func(Array)
#2 /var/www/event/vendor/devgeniem/dustpress/classes/model.php(336): DustPress\Model->run_function('Query', 'PageArchive')
#3 /var/www/event/vendor/devgeniem/dustpress/dustpress.php(1272): DustPress\Model->fetch_data(Array, true)
#4 /var/www/event/wp-includes/class-wp-hook.php(287): DustPress->create_ajax_instance('/var/www/event/...')
#5 /var/www/event/wp-includes/plugin.php(206): WP_Hook->apply_filters('/var/www/event/...', Array)
#6 /var/www/event/wp-includes/template-loader.php(104): apply_filters('template_includ...', '/var/www/event/...')
#7 /var/www/event/wp-blog-header.php(19): require_once('/var/www/event/...')
#8 /var/www/event/index.php(17): require('/var/www/event/...')
#9 {main}
thrown in /var/www/event/wp-content/themes/eventgeniem/models/page-archive.php on line`
The text was updated successfully, but these errors were encountered: