fix missing array check

This commit is contained in:
Garvin Hicking 2017-01-09 13:30:46 +01:00
parent 637c7e7667
commit 74153f69bf
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
0.11.2:
------
Fix missing is_array check
0.11:
-----

View file

@ -34,7 +34,7 @@ class serendipity_event_versioning extends serendipity_event {
));
$propbag->add('author', 'Garvin Hicking');
$propbag->add('version', '0.11.1');
$propbag->add('version', '0.11.2');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
@ -301,6 +301,7 @@ class serendipity_event_versioning extends serendipity_event {
<div>
<select name="serendipity[versioning]">
<?php
if (is_array($versions)) {
foreach($versions AS $version) {
$text = htmlspecialchars(sprintf(VERSIONING_REVISION,
$version['version'],
@ -309,6 +310,7 @@ class serendipity_event_versioning extends serendipity_event {
echo '<option value="' . $version['id'] . '" ' . ($serendipity['POST']['versioning'] == $version['id'] ? 'selected="selected"' : '') . '>' . $text . '</option>' . "\n";
}
}
?>
</select>
<input class="serendipityPrettyButton input_button" type="submit" name="serendipity[versioning_change]" value="<?php echo VERSIONING_CHANGE; ?>" onclick="return confirm('<?php echo str_replace("'", "\'", (function_exists('serendipity_specialchars') ? serendipity_specialchars(VERSIONING_CHANGE_WARNING) : htmlspecialchars(VERSIONING_CHANGE_WARNING, ENT_COMPAT, LANG_CHARSET)));