Home » Php » php – Why "Max made me put this here"?

php – Why "Max made me put this here"?

Posted by: admin July 12, 2020 Leave a comment


Every MediaWiki has a load.php.

If called without parameters it returns:

/* No modules requested. Max made me put this here */

As a curious programmer I wonder:

Why did he do this?

I am sure in a big project like this there is a good reason for it. Looks to me like it would be bad to return an empty file to an ajax query or something like it.

BTW: Normally it is called with parameters like this: load.php?debug=true&lang=de&modules=user.options&only=scripts&skin=modern&user=pi&*

How to&Answers:

This message comes from ResourceLoader.php. In the history of the file, using git blame, you can see the code was written by Roan Kattouw (RK) in this changeset. From the changeset comment:

Make load.php output a comment explaining what’s going on when no modules were requested rather than outputting nothing. Max made me do this because he hates blank pages

So, your answer is, because Max hates blank pages, and if you want to know more, you should ask Roan. My guess would be that it’s a debugging aid; rather than staring at a blank page wondering why it’s blank, at least you know that you did something that caused a module loader request to load nothing…

As @svick points out, there is also a link to the code review, including discussion of whether it’s a good idea to mention Max at all. Mentioning Max was seen as a possibility to partially close MediaWiki bug 20281, which notes that there aren’t enough Easter Eggs in MediaWiki.

And that’s why public repositories of open source software are cool 😀


It is just to know, whats going on.

If i browse the load.php file of my MediaWiki installation with my web browser and want to check if there are any errors, they may get displayed or leave me a blank page.

A blank white page indicates a PHP error which isn’t being printed to the screen.

But if i see a comment thats similar to /* No modules requested. Max made me put this here */. i do know its alright

AND that is the reason, why they needed to diff it.