Reset 404 error message for external PHP plugin (#79)

Just like the static pages plugin the external PHP plugin overrides the 404 error handling. The content from the external PHP script is displayed as expected but above this content the error message from the language constant URL_NOT_FOUND is shown. The static pages plugin resets this error message to get rid of the error message. The change in this commit does exactly the same thing for the external PHP plugin.
This commit is contained in:
Toben Schmidt 2018-08-06 08:59:59 +02:00 committed by onli
parent 14acbbac59
commit ab1b638de4

View file

@ -83,6 +83,9 @@ class serendipity_event_externalphp extends serendipity_event {
global $serendipity;
if ($this->selected()) {
$serendipity['content_message'] = ''; // Reset message for 404 error handling which is now overriden
if (!headers_sent()) {
header('HTTP/1.0 200');
header('Status: 200 OK');
@ -192,4 +195,4 @@ class serendipity_event_externalphp extends serendipity_event {
}
}
}
/* vim: set sts=4 ts=4 expandtab : */
/* vim: set sts=4 ts=4 expandtab : */