Page MenuHomePhabricator

Warning: "trim() expects parameter 1 to be string, null given" from SkinTemplate.php
Closed, DeclinedPublic

Description

MW 1.27, HHVM 3.14.3.

Warnings in /var/hhvm/error.log on every user login:

\nWarning: trim() expects parameter 1 to be string, null given in /var/www/wiki/w/includes/skins/SkinTemplate.php on line 354

In addition, although the user is logged in, an empty page is often served to him instead of the redirectto page (this could be caused by T140864: Incorrect calls of header () breaks saving some pages).

Also, on any edit action:

\nWarning: htmlspecialchars() expects parameter 1 to be string, null given in /var/www/wiki/w/includes/EditPage.php on line 3045

Event Timeline

Krinkle renamed this task from Type mismatches in error.log to Warning: "trim() expects parameter 1 to be string, null given" from SkinTemplate.php.Oct 3 2019, 3:34 AM
Krinkle closed this task as Declined.
Krinkle edited projects, added MediaWiki-Interface; removed HHVM, MediaWiki-General.
Krinkle added a subscriber: Krinkle.

This does not appear to be specific to HHVM. It is a general issue with the code. Given that this does not happen by default, I would suspect that the invalid non-string value is coming either from site configuration or from an extension or custom skin you have installed.

Closing this now as there has been no activity since, but feel free to re-open the report if you still experience the error on PHP 7.2+.