mediawiki-extensions-Scribunto/includes/Engines/LuaCommon/lualib
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
..
luabit LuaBit: Minor cleanup 2023-12-18 23:46:16 +00:00
ustring Capitalise Engines folder 2022-09-30 00:58:27 +00:00
bit32.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
libraryUtil.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.hash.lua Hide mw.hash.setupInterface from users 2022-10-08 22:01:00 +00:00
mw.html.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.language.lua LanguageLibrary: Ensure language code is a string 2024-04-11 16:20:24 +00:00
mw.lua Use correct variable for error message in mw.loadJsonData 2024-05-15 14:05:32 +01:00
mw.message.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.site.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.text.lua Synchronize mw.text.nowiki() with wfEscapeWikiText in core 2024-02-15 05:29:36 +00:00
mw.title.lua mw.title: add pageLang property 2024-01-17 18:20:06 +00:00
mw.uri.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mw.ustring.lua Capitalise Engines folder 2022-09-30 00:58:27 +00:00
mwInit.lua Optimisations for mw.clone 2024-05-24 02:08:41 +00:00
package.lua Avoid modules that should return false wrongly returning true 2024-05-24 02:10:41 +00:00
strict.lua Add strict.lua to replace "Module:No globals" 2022-10-13 04:39:21 +00:00