emoticonchooser: fixes for php >= 7.2 (#93)

This commit is contained in:
bauigel 2019-04-27 17:41:20 +02:00 committed by onli
parent 101f1d4b88
commit 657bc69abb
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2.12:
-----
fixes for PHP >= 7.2
2.11:
-----
move script to frontend_footer

View file

@ -158,7 +158,7 @@ class serendipity_event_emoticonchooser extends serendipity_event
// the actual plugin:
$plugins = serendipity_plugin_api::get_event_plugins();
$emoticate_plugin = null;
while(list($plugin, $plugin_data) = each($plugins)) {
foreach ($plugins as $plugin => $plugin_data) {
if (strpos($plugin, 'serendipity_event_emoticate') !== FALSE) {
$emoticate_plugin =& $plugin_data['p'];
break;
@ -178,7 +178,7 @@ class serendipity_event_emoticonchooser extends serendipity_event
$unique[$value] = $key;
}
// script include has to stick to to backend_header, while using inline onclick (see above)
if (IN_serendipity_admin === true) {
if (defined('IN_serendipity_admin') && IN_serendipity_admin === true) {
?>
<div class="serendipity_emoticon_bar">
<script type="text/javascript">