Warning: htmlspecialchars() expects parameter 1 to be string...

Created on 26 March 2017, about 7 years ago
Updated 16 January 2024, 5 months ago

The error occurs after the creation of the first message. Drupal 8.2.7. php 7.0.14

Warning: htmlspecialchars() expects parameter 1 to be string, object given in Drupal\Component\Utility\Html::escape() (line 421 of /var/www/html/core/lib/Drupal/Component/Utility/Html.php)
#0 /var/www/html/core/includes/bootstrap.inc(548): _drupal_error_handler_real(2, 'htmlspecialchar...', '/var/www/html/c...', 421, Array)
#1 [internal function]: _drupal_error_handler(2, 'htmlspecialchar...', '/var/www/html/c...', 421, Array)
#2 /var/www/html/core/lib/Drupal/Component/Utility/Html.php(421): htmlspecialchars(Object(Drupal\message\Entity\MessageTemplate), 11, 'UTF-8')
#3 /var/www/html/core/lib/Drupal/Component/Render/FormattableMarkup.php(259): Drupal\Component\Utility\Html::escape(Object(Drupal\message\Entity\MessageTemplate))
#4 /var/www/html/core/lib/Drupal/Component/Render/FormattableMarkup.php(200): Drupal\Component\Render\FormattableMarkup::placeholderEscape(Object(Drupal\message\Entity\MessageTemplate)) #5 /var/www/html/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php(204): Drupal\Component\Render\FormattableMarkup::placeholderFormat('@type: added %t...', Array)
#6 /var/www/html/core/lib/Drupal/Component/Utility/ToStringTrait.php(15): Drupal\Core\StringTranslation\TranslatableMarkup->render()
#7 [internal function]: Drupal\Core\StringTranslation\TranslatableMarkup->__toString() #8 /var/www/html/core/modules/dblog/src/Controller/DbLogController.php(180): strip_tags(Object(Drupal\Core\StringTranslation\TranslatableMarkup))
#9 [internal function]: Drupal\dblog\Controller\DbLogController->overview()
#10 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#11 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#13 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#14 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Object(Closure), Array) #16 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#17 /var/www/html/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #26 {main}.

πŸ› Bug report
Status

Closed: cannot reproduce

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine proweb.ua

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024