isset() should only be used to suppress errors, not for null check.
When the variable is always defined, there is no need to use isset.
Found by a new phan plugin (2efea9f989)
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset
Change-Id: I8fc8fbf220a08c300ae0119e548a691865151ae5
* The key group should generally reflect a single logical key,
usually a single getWithSet call, with the rest being variants
of that key, e.g. not a namespace.
* Give it an explicit expiry. I noticed this issue by reviewing the
remaining data stored on WMF's mainstash-redis instances.
There were some old file-pdf:* keys there from long ago. They were
able to survive this long due to not having an expiry set.
Ref https://phabricator.wikimedia.org/T280586#8168908
Ref https://phabricator.wikimedia.org/T314453#8168858
Change-Id: Ibad24c0ac7d1e7f965227f49320814b96375858e
By default the mediabox is used. This is the full potential area of
pages, as also used by PDF editors and can contain areas outside of
the page.
The cropbox is also the size that is reported by pdfinfo as the
pagesize.
Bug: T167420
Change-Id: I92267a9dbe81b6e0e471b8eae1e4c2ba4e5d84e9
The variables are set to default values in extension.json, so
someone would have to manually set them to null values to trigger
this check. At that point, surely you'd just disable the extension.
A check like is_executable() might've made sense, however with the
introduction of Shellbox, it would be totally fine for the binaries
to not exist on the host where MediaWiki is running, but only in the
container. So just removing the check seems like the most
straightforward thing to do.
Bug: T289228
Change-Id: I5da0625959fdfa01c36c955c82320dbc591b3f23
These messages have not changed since they were originally defined
in f4f87ceb (2015). Instead of using a hook to register the module
at runtime, put it in extension.json with a note next to the warning
configuration to keep the messages in sync.
Change-Id: I135bf1a9f2cd59926a40cc565e5c8a2a6f2483c0
* Migrate to the new metadata system: override getSizeAndMetadata()
* Use getHandlerState() instead of a custom property on the File object.
* Opt in to metadata splitting. Avoid loading the text item unless it is
really needed.
* In getDimensionInfo(), use getHandlerState() instead of the
WANObjectCache process cache (pcTTL). This is just a
micro-optimisation, informed by profiling, which showed 90 calls to
this function during an image page view.
Depends-On: I876ea5c9d3a1881e278f689d2f8a3ae20240c703
Change-Id: I30d0b0009fcb11c14d14663bd1f2c2a3dfac55d6
According to ghostscript developers the parameter -sstdout should
be after -sOutputFile.
Bug: T50007
Change-Id: I13fd25ada571aee9eb793cd6e195a04eb86bce63
Replacement with services made available in 1.28 and this extension
requires 1.32. So, the replacement is good.
Change-Id: I7939726f5a1d516f17e416bec1999faab95db806