# Authors-System error

**URL:** <https://forum.getkirby.com/t/authors-system-error/7989>\
**Category:** Questions\
**Tags:** v2\
**Created:** [July 15, 2017, 12:17pm UTC](https://forum.getkirby.com/t/authors-system-error/7989 "2017-07-15T12:17:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![demlak](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@demlak](https://forum.getkirby.com/u/demlak)\
**Post date:** [July 15, 2017, 12:17pm UTC](https://forum.getkirby.com/t/authors-system-error/7989/1 "2017-07-15T12:17:30Z")

</div>

Hi,  
i’m trying to follow this tutorial for getting an author system: [Author-System](https://getkirby.com/docs/cookbook/author-system)

i’m able to get the suggested author-listing-page to work…  
but the article-template does not work

i get this error:  
`Call to a member function url() on null`

it’s a bout this line:  
`<img src="<?php echo $author->images()->first()->url() ?>"> `

thx in advance

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [July 15, 2017, 12:26pm UTC](https://forum.getkirby.com/t/authors-system-error/7989/2 "2017-07-15T12:26:55Z")

</div>

When working with objects (like an image in this case), always check if it exists before calling a method (like `url()`) on it:

```auto
<php
$image = $author->images()->first(); // `$author->image()` would give you the first image as well
if($image): 
?>
  <img src="<?= $image->url() ?>">
<?php endif ?>

```

---

<div class="post-metadata">

**Author:** ![demlak](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@demlak](https://forum.getkirby.com/u/demlak)\
**Post date:** [July 15, 2017, 12:46pm UTC](https://forum.getkirby.com/t/authors-system-error/7989/3 "2017-07-15T12:46:38Z")

</div>

that helped… got it to work with my template… thx a lot

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:35pm UTC](https://forum.getkirby.com/t/authors-system-error/7989/4 "2025-02-06T17:35:18Z")

</div>


