PHP7 check

This commit is contained in:
Garvin Hicking 2017-04-08 17:01:31 +02:00
parent 86a17f9a2b
commit b8897b3250

View File

@ -206,7 +206,7 @@ class serendipity_plugin_api
$rs = serendipity_db_query("SELECT MAX(sort_order) as sort_order_max FROM {$serendipity['dbPrefix']}plugins WHERE placement = '$default_placement'", true, 'num');
if (is_array($rs)) {
if (is_array($rs) && isset($rs[0]) && !empty($rs[0])) {
$nextidx = intval($rs[0] + 1);
} else {
$nextidx = 0;