As we were notified on our forums, the updated PHP 5.3.2 version seems to have changed a behaviour of quoting array variables within strings, which produces a PHP parse error on a serendipity file include/functions_entries.inc.php at line 1433 (in Serendipity 1.5.3).
The fix is actually quite easy, if you replace the code found at line 1433 from this:
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entries WHERE id=$id");
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entrycat WHERE entryid=$id");
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entryproperties WHERE entryid=$id");
serendipity_db_query("DELETE FROM {$serendipity["dbPrefix2]}comments WHERE entry_id=$id");
to this:
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entries WHERE id=$id");
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entrycat WHERE entryid=$id");
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid=$id");
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}comments WHERE entry_id=$id");
If you can't easily spot the difference: It's changing ["dbprefix"] with double quotes to ['dbprefix'] with single quotes. We're sorry for this inconvenience, which is already fixed in our SVN branches and will be part of the next release.
Thanks a lot to fyremoon from the forums, this thread.
var flattr_uid = 'supergarv'; var flattr_tle = 'PHP Parse Error on new PHP 5.3.2'; var flattr_dsc = 'As we were notified on our forums, the updated PHP 5.3.2 version seems to have changed a behaviour of quoting array variables within strings, which produces a PHP parse error on a serendipity file include/functions_entries.inc.php at line 1433 (in Serendipity 1.5.3). The fix is actually quite easy, if you replace the code found at line 1433 from this: serendipity_db_query(\"DELETE FROM {$serendipity[\"dbPrefix\"]}entries WHERE id=$id\"); serendipity_db_query(\"DELETE FROM {$serendipity[\"dbPrefix\"]}entrycat WHERE entryid=$id\"); serendipity_db_query(\"DELETE FROM {$serendipity[\"dbPrefix\"]}entryproperties WHERE entryid=$id\"); serendipity_db_query(\"DELETE FROM {$serendipity[\"dbPrefix2]}comments WHERE entry_id=$id\"); to this: serendipity_db_query(\"DELETE FROM {$serendipity[\'dbPrefix\']}entries WHERE id=$id\"); serendipity_db_query(\"DELETE FROM {$serendipity[\'dbPrefix\']}entrycat WHERE entryid=$id\"); serendipity_db_query(\"DELETE FROM {$serendipity[\'dbPrefix\']}entryproperties WHERE entryid=$id\"); serendipity_db_query(\"DELETE FROM {$serendipity[\'dbPrefix\']}comments WHERE entry_id=$id\"); If you can\'t easily spot the difference: It\'s changing [\"dbprefix\"] with double quotes to [\'dbprefix\'] with single quotes. We\'re sorry for this inconvenience, which is already fixed in our SVN branches and will be part of the next release. Thanks a lot to fyremoon from the forums, this thread. '; var flattr_cat = 'text'; var flattr_lng = 'en_GB'; var flattr_tag = ''; var flattr_url = 'http://blog.s9y.org/archives/220-PHP-Parse-Error-on-new-PHP-5.3.2.html'; var flattr_btn = 'default';