Fatal error: Call to a member function firstName() on a non-object in /home/content/43/10758043/html/site/controllers/author.php on line 16
Kirby CMS Debugger
Whoops \ Exception \ ErrorException (E_ERROR)
Call to a member function firstName() on a non-object Whoops\Exception\ErrorException thrown with message "Call to a member function firstName() on a non-object" Stacktrace: #0 Whoops\Exception\ErrorException in /home/content/43/10758043/html/site/controllers/author.php:16
Stack frames (1)
0
Whoops
\
Exception
\
ErrorException
/
home
/
content
/
43
/
10758043
/
html
/
site
/
controllers
/
author.php
16
/
home
/
content
/
43
/
10758043
/
html
/
site
/
controllers
/
author.php
<?php
 
// This is a controller file that contains the logic for the blog template.
// It consists of a single function that returns an associative array with
// template variables.
//
// Learn more about controllers at:
// https://getkirby.com/docs/developer-guide/advanced/controllers
 
return function($site, $pages, $page, $args) {
  global $this_user;
  $this_user = $args['user'];
  $author = $site->user($this_user);
 
   
  if ($author->firstName() && $author->lastName()) {
    $author_name = $author->firstName().' '.$author->lastName();
  } else {
    $author_name = $author->username();
  }
 
  $perpage  = $page->perpage()->int();
  $articles = page('articles')->children()->children()->filter(function($p) {
    global $this_user;
 
    $authors =  yaml($p->authors());
    foreach($authors as $author) {
      if($author['author'] == $this_user) {
        return true;
      }
    }
    return false;
  })->paginate(($perpage >= 1)? $perpage : 15)->sortBy('date', 'desc');; 
  
  return [
    'class'   => 'archive',
    'articles'   => $articles,
    'author_name'   => $author_name,
    'pagination' => $articles->pagination()
  ];

Environment & details:

Key Value
Kirby Toolkit v2.4.1
Kirby CMS v2.4.1
empty
empty
empty
empty
Key Value
kirby_session_fingerprint da5813addb19d7be6c63eeacf9e08822695249ea
kirby_session_activity 1513567276
Key Value
TMPDIR /home/content/43/10758043/tmp
PHPRC /home/content/43/10758043/html/
TEMP /home/content/43/10758043/tmp
PHP_FCGI_CHILDREN 0
PATH /sbin:/usr/sbin:/bin:/usr/bin
PWD /web/cgi-bin
SHLVL 0
SPI TRUE
TMP /home/content/43/10758043/tmp
PHP_FCGI_MAX_REQUESTS 100000
HTTP_CONNECTION close
SCRIPT_NAME /index.php
REQUEST_URI /author/
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /~c8f30593/author/
REMOTE_PORT 48644
SCRIPT_FILENAME /var/chroot/home/content/43/10758043/html/index.php
SERVER_ADMIN support@secureserver.net
CONTEXT_DOCUMENT_ROOT /var/chroot/home/content/43/10758043/html
REQUEST_SCHEME http
DOCUMENT_ROOT /var/chroot/home/content/43/10758043/html
REMOTE_ADDR 54.91.171.137
SERVER_PORT 80
SERVER_ADDR 50.62.242.1
SERVER_NAME the-exhibitionist.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
Apache Server at the-exhibitionist.com Port 80
LD_LIBRARY_PATH /web/httpd24/lib
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_ACCEPT_ENCODING x-gzip, gzip, deflate
HTTP_HOST the-exhibitionist.com
PARENT_DOCUMENT_ROOT /var/chroot/home/content/43/10758043/html
GD_PHP_HANDLER x-httpd-php5-4
userlimit_limit 50
userlimit_name 10758043
REAL_USERNAME c8f30593
SUBDOMAIN_DOCUMENT_ROOT /var/chroot/home/content/43/10758043/html
GD_ERROR_DOC .errordocs/missing.html
REDIRECT302
XID 10758043
REAL_DOCUMENT_ROOT /var/chroot/home/content/43/10758043/html
DOMAIN_NAME the-exhibitionist.com
SCRIPT_URI http://the-exhibitionist.com/author/
SCRIPT_URL /author/
UNIQUE_ID Wjc0LLioG7IAAHkiWvMAAAB9
REDIRECT_STATUS 200
REDIRECT_PARENT_DOCUMENT_ROOT /var/chroot/home/content/43/10758043/html
REDIRECT_TMPDIR /home/content/43/10758043/tmp
REDIRECT_TEMP /home/content/43/10758043/tmp
REDIRECT_TMP /home/content/43/10758043/tmp
REDIRECT_PHPRC /home/content/43/10758043/html/
REDIRECT_GD_PHP_HANDLER x-httpd-php5-4
REDIRECT_userlimit_limit 50
REDIRECT_userlimit_name 10758043
REDIRECT_REAL_USERNAME c8f30593
REDIRECT_SUBDOMAIN_DOCUMENT_ROOT /var/chroot/home/content/43/10758043/html
REDIRECT_GD_ERROR_DOC .errordocs/missing.html
REDIRECT_REDIRECT302
REDIRECT_XID 10758043
REDIRECT_REAL_DOCUMENT_ROOT /var/chroot/home/content/43/10758043/html
REDIRECT_DOMAIN_NAME the-exhibitionist.com
REDIRECT_SCRIPT_URI http://the-exhibitionist.com/author/
REDIRECT_SCRIPT_URL /author/
REDIRECT_UNIQUE_ID Wjc0LLioG7IAAHkiWvMAAAB9
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1513567276.1428
REQUEST_TIME 1513567276
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler