ParserOutput::setUnindexedPageProperty(): use empty string as default value
If a placeholder value is needed, it is recommended to use the empty string to avoid wasting database space unnecessarily. Operationalize this recommendation by providing a default value for the method argument. Bug: T305158 Bug: T350224 Change-Id: I9ea8d93298d771c2d38fdfb451a2817220ca679a
This commit is contained in:
parent
0721b0af62
commit
b4721e24aa
1 changed files with 4 additions and 3 deletions
|
|
@ -1556,13 +1556,14 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector {
|
|||
/**
|
||||
* Set a page property which is *not* intended to be indexed.
|
||||
*
|
||||
* See `::setPageProperty()` for details.
|
||||
* See `::setPageProperty()` for details. It is recommended to
|
||||
* use the empty string if you need a placeholder value.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @param string $value Optional value; defaults to the empty string.
|
||||
* @since 1.42
|
||||
*/
|
||||
public function setUnindexedPageProperty( string $name, string $value ): void {
|
||||
public function setUnindexedPageProperty( string $name, string $value = '' ): void {
|
||||
$this->mProperties[$name] = $value;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue