PLEASE NOTE: Since having to deal with a Fatal error Exception thrown:
Uncaught exception 'ErrorException' with message 'Warning: Illegal string offset 'properties'' in /plugins/serendipity_event_nl2br/serendipity_event_nl2br.php:212
Stack trace:
#0 plugins/serendipity_event_nl2br/serendipity_event_nl2br.php(212): errorToExceptionHandler(2, 'Illegal string ...', '/var/www/...', 212, Array)
#1 include/plugin_api.inc.php(1141): serendipity_event_nl2br->event_hook('frontend_displa...', Object(serendipity_property_bag), Array, NULL)
#2 plugins/serendipity_event_guestbook/serendipity_plugin_guestbook.php(196): serendipity_plugin_api::hook_event('frontend_displa...', Array)
#3 include/plugin_api.inc.php(934): serendipity_plugin_guestbook->generate_content('G/xC3/xA4stebuch-Seit...')
changing previous set
!in_array($this->instance, $serendipity['POST']['properties']['disable_markups']) &&
to
!@in_array($this->instance, $serendipity['POST']['properties']['disable_markups']) &&
would give us a wrong result check, since the function !@ is returning false, if 2cd param is not an array, not its value!
See: !@in_array() == FALSE and (isset($serendipity['POST']['properties']['disable_markups']) && !in_array($this->instance, $serendipity['POST']['properties']['disable_markups'])) = TRUE
$serendipity['POST']['properties']['disable_markups'] = array(false); is the only workable solution for (sidebar?) plugins (see sidebar plugins: guestbook, multilingual), to explicitly allow to apply nl2br to markup (if we want to)