Parcourir la 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 il y a 23 ans
Parent
commit
d840d4a5a9
1 fichiers modifiés avec 6 ajouts et 1 suppressions
  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;
         }