event_versioning: error saving draft with no body

Found a bug? Tell us!!
Post Reply
User avatar
Posts: 77
Joined: Fri Mar 16, 2007 9:10 pm
Location: Flensburg / Germany

event_versioning: error saving draft with no body

Post by rowi » Thu Jan 05, 2017 10:08 am

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

User avatar
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Re: event_versioning: error saving draft with no body

Post by garvinhicking » Mon Jan 09, 2017 1:31 pm


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

# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

Post Reply