friendica / friendica-directory

Global directory for the Friendica project. The repository has moved to git.friendi.ca/friendica/friendica-directory
GNU Affero General Public License v3.0
20 stars 11 forks source link

PHP message: Slim Application Error - zend-escaper #23

Closed AndyHee closed 5 years ago

AndyHee commented 5 years ago

I persistently get this Slim Application Error.

What's happening here?

2019/02/02 16:52:04 [error] 1956#1956: *9899 FastCGI sent in stderr: "PHP message: Slim Application Error:                                                   │
Type: Zend\Escaper\Exception\RuntimeException                                                                                                                │
Message: String to be escaped was not valid UTF-8 or could not be converted:                                                                                 │
File: /var/www/dirfrn/vendor/zendframework/zend-escaper/src/Escaper.php                                                                                      │
Line: 329                                                                                                                                                    │
Trace: #0 /var/www/dirfrn/vendor/zendframework/zend-escaper/src/Escaper.php(161): Zend\Escaper\Escaper->toUtf8(NULL)                                         │
#1 /var/www/dirfrn/src/classes/Views/PhpRenderer.php(57): Zend\Escaper\Escaper->escapeHtmlAttr(NULL)                                                         │
#2 /var/www/dirfrn/src/templates/search.phtml(12): Friendica\Directory\Views\PhpRenderer->__call('escapeHtmlAttr', Array)                                    │
#3 /var/www/dirfrn/vendor/slim/php-view/src/PhpRenderer.php(188): include('/var/www/dirfrn...')                                                              │
#4 /var/www/dirfrn/vendor/slim/php-view/src/PhpRenderer.php(169): Slim\Views\PhpRenderer->protectedIncludeScope('/var/www/dirfrn...', Array)                 │
#5 /var/www/dirfrn/src/classes/Controllers/Web/Search.php(103): Slim\Views\PhpRenderer->fetch('search.phtml', Array)                                         │
#6 /var/www/dirfrn/src/classes/Routes/Web/BaseRoute.php(39): Friendica\Dire" while reading response header from upstream, client: 54.36.149.41, server: dir.h│
MrPetovan commented 5 years ago

Do you have a specific URL to reproduce the error? It seems to happen in the search, but the range of possibilities is pretty large.

MrPetovan commented 5 years ago

Ha, never mind, it crashes when you pass an empty search string.

AndyHee commented 5 years ago

The error is logged in roughly five minute intervals around the clock.

I'm not sure if this relates to searching.

MrPetovan commented 5 years ago

Fixed in https://github.com/friendica/friendica-directory/commit/0e4d5a035ff3b703bdc342bc0eb1b10a988937bb