Some exception messages add tracking categories, which fail when there
is no title context.
Bug: T351045
Change-Id: I47d0160010c9da5a9a9974718a432fd5e79f8286
empty() should only be used to suppress errors
When the type of the variable is array,
a falsy check is the same (checks for null, false and empty array)
Found by a new phan plugin (T234237)
Change-Id: Id855be9dd25a27d9e46e3065dacbd268177b073d
This replaces the use of ParserOutput::addJsConfigVars(), deprecated
since 1.38, and ensures that the IDs used for error messages are
independent of page parse order. (See T300979.)
This is an improved replacement for Ibd3fbcbc774491179b0d4fe29ba3b6a128220703
which was reverted (T346094).
Bug: T300307
Bug: T305161
Bug: T346094
Change-Id: I2c660972b289bbad730ceee1325d70d5ba75d27e
phan under php8.1 also detects PhanImpossibleTypeComparisonInLoop here,
but that cannot suppressed under php7.4,
so use @phan-var to set to the correct type, but keep the comment.
The suppression was added with 8328acb9 for a update of phan
According to the doc proc_get_status can only return array
(at least under php8.1)
Change-Id: Ieda5abc30126eed2e3a9f5fc283d36e64180f496
timeout while converting timestamps should be a timeout for the whole
parse of that wikitext and not hidden by a invalid time.
Just let the exception bubble up to the caller
See ca71e69f for more information
Change-Id: I1f44e45dcc9b052717814990a3f5ce3a1bdf9d26
This reverts commit 9f8d16f9c9.
Reason for revert: Causes internal error on certain pages.
Bug: T346094
Change-Id: Ia9ccffbbbe2fe2413b54fb5e16f5cfc53527990e
Most uses can be replaced with ::setJsConfigVar(); the major semantic
change is that ::setJsConfigVar() is not expected to overwrite
previous values. That *may* be an issue here, but if so it's not
a change from existing behavior, as the way ::addJsConfigVars() was
being called it would override previous values as well.
Bug: T300307
Bug: T305161
Change-Id: Ibd3fbcbc774491179b0d4fe29ba3b6a128220703
Override the target language in the parser options, so that it isn’t
looked up from the database; this lets UriLibraryTest avoid database
access. And since the Database group is no longer strictly required,
remove the statement to that effect from the phpdoc again.
Bug: T345372
Change-Id: I79f35257b123eb939d9ab67b16aa56d34586bb67
- Force a content model on the title used by LuaEngineTestBase, so that
calls to getPageLanguage() won't end up hitting the DB
- Don't actually use SiteStats from SiteLibrary in unit tests. There
seem to be no test actually using this data.
Bug: T345372
Change-Id: I35884f04b582678982fb5f64d9199bab41cd8bce
All LuaEngineTestBase subclasses must be in the Database group, as far
as I can tell it can’t be avoided. (Several already are anyway.) We
can’t centrally do this in the base class anymore (needsDB() can no
longer be overridden), so just add it to the phpdoc here.
Bug: T345372
Change-Id: I47016ec84ed227f755f94a383bee8053975b4c81
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.
Bug: T271026
Change-Id: I1583f5075937c4ce71a0d8748700f7012280851c
Using code by David Manura, published at lua-users.org/wiki/StringTrim
Note '\t\r\n\f ' is replaced with '%s', thus '\v' (vertical tab) is added to the characters trimmed by default.
Bug: T338561
Change-Id: I98e2677f1181b88f4cd97cffca3a53ce426ec5cd
No longer used since 1.33
Automatically removed message keys with "doc-apihelp-description" in qqq
Bug: T340253
Change-Id: Ic533cea25b7ab6b5d390a73c306abd584f5c9c33