Browse Source

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 years ago
parent
commit
d840d4a5a9
1 changed files with 6 additions and 1 deletions
  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) {
     foreach ($message->rfc822_header->mlist as $cmd => $actions) {
 
 
 	/* I don't know this action... skip it */
 	/* 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;
             continue;
         }
         }