# TypeError: Argument #1 ($string) after uploading the website on a host

**URL:** <https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297>\
**Category:** Questions\
**Tags:** v3\
**Created:** [December 13, 2022, 7:19pm UTC](https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297 "2022-12-13T19:19:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mounir](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mounir/32/12695_2.png) [@Mounir](https://forum.getkirby.com/u/Mounir)\
**Post date:** [December 13, 2022, 7:19pm UTC](https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297/1 "2022-12-13T19:19:16Z")

</div>

Hey Everyone,

This is my first website with Kirby, excited for it to be on air  
unfortunately after I uploaded the website to the host, whenever I try to upload content from the panel I get this error:

TypeError  
Kirby\Toolkit\Str::esc(): Argument #1 ($string) must be of type string, null given, called in /home/u379737048/domains/daleelal-khrijeen.com/public\_html/kirby/config/methods.php on line 344

Any ideas why?

---

<div class="post-metadata">

**Author:** ![Mounir](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mounir/32/12695_2.png) [@Mounir](https://forum.getkirby.com/u/Mounir)\
**Post date:** [December 13, 2022, 7:20pm UTC](https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297/2 "2022-12-13T19:20:25Z")

</div>

this is the line: ```  
public static function esc(string $string, string $context = ‘html’): string

```auto

```

---

<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:** [December 13, 2022, 7:25pm UTC](https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297/3 "2022-12-13T19:25:43Z")

</div>

Which Kirby version are you using with which version of PHP?

---

<div class="post-metadata">

**Author:** ![Mounir](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mounir/32/12695_2.png) [@Mounir](https://forum.getkirby.com/u/Mounir)\
**Post date:** [December 13, 2022, 7:54pm UTC](https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297/4 "2022-12-13T19:54:11Z")

</div>

Kirby 3, Not sure how to check for my php version…  
this is my website: [https://daleelal-khrijeen.com/en](https://daleelal-khrijeen.com/en)

---

<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:** [December 13, 2022, 7:56pm UTC](https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297/5 "2022-12-13T19:56:32Z")

</div>

You can check your php version using

```auto
<?php
phpinfo();

```

> [@Mounir](#):
>
> Kirby 3,

Well, I would need the exact version, there have been quite a few releases between Kirby 3.0.0 and the current latest 3.8.3…

---

<div class="post-metadata">

**Author:** ![Mounir](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mounir/32/12695_2.png) [@Mounir](https://forum.getkirby.com/u/Mounir)\
**Post date:** [December 13, 2022, 7:59pm UTC](https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297/6 "2022-12-13T19:59:01Z")

</div>

kirby 3.7.4  
php 8.0.24

---

<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:** [December 13, 2022, 8:11pm UTC](https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297/7 "2022-12-13T20:11:25Z")

</div>

The issue happens because your field on which you call `esc` in line 24 in projects.php snippet seems to be empty.

This is something that has been fixed in later versions of Kirby.

So there are two options:

1. Make sure that the field contains a value or check that in your code before you call `esc` or
2. Update Kirby

---

<div class="post-metadata">

**Author:** ![Mounir](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mounir/32/12695_2.png) [@Mounir](https://forum.getkirby.com/u/Mounir)\
**Post date:** [December 14, 2022, 10:37am UTC](https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297/8 "2022-12-14T10:37:52Z")

</div>

> [@texnixe](#):
>
> Update Kirby

Thank you Sonia!  
I updated the kirby version and it worked!

Happy holidays

---

<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:** [December 14, 2022, 10:58am UTC](https://forum.getkirby.com/t/typeerror-argument-1-string-after-uploading-the-website-on-a-host/27297/9 "2022-12-14T10:58:28Z")

</div>

Great! Thank you, happy holidays to you, too!
