Page 1 of 1

event_versioning: error saving draft with no body

Posted: Thu Jan 05, 2017 11:08 am
by rowi
Just tried to save an article as draft which contained no body text (just wanted to have a stub with title to fill it later).
If I try to save it, I get the following error:
Fatal error: Uncaught exception 'ErrorException' with message 'Warning: Invalid argument supplied for foreach()' in /var/www/vhosts/hosting6433.af940.netcup.net/httpdocs/s9y-rowi/plugins/serendipity_event_versioning/serendipity_event_versioning.php:304 Stack trace: #0 /var/www/vhosts/hosting6433.af940.netcup.net/httpdocs/s9y-rowi/plugins/serendipity_event_versioning/serendipity_event_versioning.php(304): errorToExceptionHandler(2, 'Invalid argumen...', '/var/www/vhosts...', 304, Array) #1 /var/www/vhosts/hosting6433.af940.netcup.net/httpdocs/s9y-rowi/include/plugin_api.inc.php(1139): serendipity_event_versioning->event_hook('backend_display', Object(serendipity_property_bag), Array, NULL) #2 /var/www/vhosts/hosting6433.af940.netcup.net/httpdocs/s9y-rowi/include/functions_smarty.inc.php(599): serendipity_plugin_api::hook_event('backend_display', Array, NULL) #3 /var/www/vhosts/hosting6433.af940.netcup.net/httpdocs/s9y-rowi/templates_c/2k11/d5/63/45/d5634564f16af5eef1f9f2fe119a34dda40ace5f_0.file.entries.tpl.php(288): seren in /var/www/vhosts/hosting6433.af940.netcup.net/httpdocs/s9y-rowi/plugins/serendipity_event_versioning/serendipity_event_versioning.php on line 304
The article gets saved, though. Entering a single letter as body avoids the error message. S9y Version is 2.1 Beta 3

Re: event_versioning: error saving draft with no body

Posted: Mon Jan 09, 2017 2:31 pm
by garvinhicking
Hi!

Thanks for reporting, fixed in 0.11.2. It's just a missing array check I think.

Regards,
Garvin