getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.32k stars 170 forks source link

[3.4.0 RC2] - html encoding #2687

Closed modufolio closed 4 years ago

modufolio commented 4 years ago

Describe the bug
I cant use html encoding in this example <?= html($query) ?>

To Reproduce
https://getkirby.com/docs/cookbook/content/search

Kirby Version
[3.4.0 RC2]

Console output
TypeError thrown with message "Argument 1 passed to Kirby\Toolkit\Html::encode() must be of the type string, null given, called in /Users/macbook/Sites/kirby3-dev/kirby/config/helpers.php on line 244"

Stacktrace:

11 TypeError in /Users/macbook/Sites/kirby3-dev/kirby/src/Toolkit/Html.php:155

10 Kirby\Toolkit\Html:encode in /Users/macbook/Sites/kirby3-dev/kirby/config/helpers.php:244

9 html in /Users/macbook/Sites/kirby3-dev/site/templates/search.php:10

8 include in /Users/macbook/Sites/kirby3-dev/kirby/src/Toolkit/F.php:400

7 Kirby\Toolkit\F:loadIsolated in /Users/macbook/Sites/kirby3-dev/kirby/src/Toolkit/F.php:377

6 Kirby\Toolkit\F:load in /Users/macbook/Sites/kirby3-dev/kirby/src/Toolkit/Tpl.php:35

5 Kirby\Toolkit\Tpl:load in /Users/macbook/Sites/kirby3-dev/site/plugins/kirby-minify-html/index.php:14

4 MinifyHTML:render in /Users/macbook/Sites/kirby3-dev/kirby/src/Cms/Page.php:1200

3 Kirby\Cms\Page:render in /Users/macbook/Sites/kirby3-dev/kirby/src/Cms/App.php:655

2 Kirby\Cms\App:io in /Users/macbook/Sites/kirby3-dev/kirby/src/Cms/App.php:1004

1 Kirby\Cms\App:render in /Users/macbook/Sites/kirby3-dev/index.php:18

0 require in /Users/macbook/.composer/vendor/laravel/valet/server.php:158

bastianallgeier commented 4 years ago