mediawiki-extensions-Scribunto/includes
theknightwho acd7ec66ea Avoid modules that should return false wrongly returning true
When modules are first loaded by `require` in package.lua, it checks
for a return value with `if res then`. If that check fails, the module
will be cached with the default value `true` at line 109, and that
value is then returned.

That check should be changed to `if res ~= nil then`, because
otherwise a module with a return value of `false` will be cached with
the value `true`.

This also necessitates a corresponding change to the check at line 93,
which is when `package.loaded` is initially checked to see if a package
has been loaded before, as that value could be `false`.

Bug: T362045
Change-Id: Id42e26a922c13971c25ed8654e822dc6fdcb6ca7
2024-05-24 02:10:41 +00:00
..
Engines Avoid modules that should return false wrongly returning true 2024-05-24 02:10:41 +00:00
Hooks Create HookRunner class and the hook handler interfaces 2023-06-19 21:39:33 +00:00
ApiScribuntoConsole.php Use ObjectCacheFactory instead of deprecated ObjectCache method 2024-05-14 20:07:42 +00:00
CodeEditorHooks.php Inject services into ApiScribuntoConsole, CodeEditorHooks and Hooks 2024-03-18 04:40:47 +00:00
Hooks.php Use ObjectCacheFactory instead of deprecated ObjectCache method 2024-05-14 20:07:42 +00:00
Scribunto.php Replace global configuration variables 2024-03-18 04:40:44 +00:00
ScribuntoContent.php Use namespaced classes 2024-01-05 19:24:06 +01:00
ScribuntoContentHandler.php Replace global configuration variables 2024-03-18 04:40:44 +00:00
ScribuntoEngineBase.php build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0 2024-03-10 23:46:30 +01:00
ScribuntoException.php Use namespaced classes 2024-01-05 19:24:06 +01:00
ScribuntoModuleBase.php Use namespaced classes 2024-01-05 19:24:06 +01:00