浏览代码

Seems to be using a PHP 4.1 only function... changing code so also the PHP 4.0 syntax can be
used.

Thijs Kinkhorst 23 年之前
父节点
当前提交
d840d4a5a9
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      plugins/listcommands/setup.php

+ 6 - 1
plugins/listcommands/setup.php

@@ -40,7 +40,12 @@ function plugin_listcommands_menu() {
     foreach ($message->rfc822_header->mlist as $cmd => $actions) {
 
 	/* I don't know this action... skip it */
-	if(!array_key_exists($cmd, $fieldsdescr)) {
+        /* grrr PHP keeps changing their syntax... */
+        if( function_exists('array_key_exists') ) {
+            if(!array_key_exists($cmd, $fieldsdescr)) {
+                continue;
+            }
+        } elseif ( !key_exists($cmd, $fieldsdescr) ) {
             continue;
         }