The method detect_plugin_component() returns false or string. The
normalize_component() expects strings only. Passing false to it
(typically when the plugin does not declare its component) caused the
PHP warning.
Credit goes to Ankit Agarwal for spotting this during testing.
Previously, the acknowledgement was required only when installing
plugins from the ZIP file. It is valid when installing plugins from the
Plugins directory, too. So we display it at the validator page now to
make sure it is displayed in both cases.
There is no need to require the admin to check the acknowledgement box
now. We do not do that anywhere in admin UI (and there are more
dangerous operations than installing a plugin). Admins still can deploy
plugins manually without this tool anyway. And at the end, they are
admins. They should know what they are doing. Simply displaying the
acknowledgement message before they click the install button is enough.
Now we allow the plugin type left unselected and we attempt to
auto-detect it. Only when the auto-detection fails, the admin has to
manually select the type of the plugin.
On contrary to deeper heuristic (read: guessing) we perform in the
Plugins directory (such as looking at the names of the language files),
here we simply rely on the plugin component being correctly defined in
the version.php file.
The validator class has more robust processing, to make sure the
component declaration is not provided in a commented area of the
version.php etc. However, as it is fully acceptable that the
auto-detection fails if the version.php uses non-standard syntax, this
easier approach is valid here.
Header retrieval should only be performed on the base message, and not each
part of the message as is currently performed.
This came to light because Google changed their IMAP server such that, if
you inform the data query that you wish to retrieve the headerText for a
part which does not contain a MIME header, then no message is retrieved in
the search causing a general failure of the IMAP fetch.
In normal circumstances, headers should only be a part of the base message
part.
Any message which includes:
* Precedence: bulk
* X-Autoreply: !no
* X-Autoresponse: !no
* Auto-Submitted: !no
Will not be detected as a bulk message and therefore ignored.