resourceloader: Change Context::getHash to always pass strings to implode
implode is documented as taking a string[], not mixed with int or null. Explicitly cast or remove those instead of the implicit handling by PHP. Change-Id: I0fac52c861bf85e09571b61a899b7a041aa77914
This commit is contained in:
parent
7c0ffb3b24
commit
808191ebc4
1 changed files with 9 additions and 9 deletions
|
|
@ -384,20 +384,20 @@ class ResourceLoaderContext implements MessageLocalizer {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getHash(): string {
|
public function getHash(): string {
|
||||||
if ( !isset( $this->hash ) ) {
|
if ( $this->hash === null ) {
|
||||||
$this->hash = implode( '|', [
|
$this->hash = implode( '|', [
|
||||||
// Module content vary
|
// Module content vary
|
||||||
$this->getLanguage(),
|
$this->getLanguage(),
|
||||||
$this->getSkin(),
|
$this->getSkin(),
|
||||||
$this->getDebug(),
|
(string)$this->getDebug(),
|
||||||
$this->getUser(),
|
$this->getUser() ?? '',
|
||||||
// Request vary
|
// Request vary
|
||||||
$this->getOnly(),
|
$this->getOnly() ?? '',
|
||||||
$this->getVersion(),
|
$this->getVersion() ?? '',
|
||||||
$this->getRaw(),
|
(string)$this->getRaw(),
|
||||||
$this->getImage(),
|
$this->getImage() ?? '',
|
||||||
$this->getVariant(),
|
$this->getVariant() ?? '',
|
||||||
$this->getFormat(),
|
$this->getFormat() ?? '',
|
||||||
] );
|
] );
|
||||||
}
|
}
|
||||||
return $this->hash;
|
return $this->hash;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue